From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

拖动图片,创建图片对象。

已解决!
转到解答

我想实现如下的功能。在一个自定义的工具栏里面创建很多图片。然后每拖动一个图片,就在前面板上创建一个新的同样的图片到某个位置。到底应该怎么实现这个功能呢?想了挺久,都没个思路。请高手们多多指教,给个idea。

0 项奖励
1 条消息(共 6 条)
4,388 次查看
解答
已被主题作者 云上飞 接受

While I have only access to LV7.1 at this moment, I have created attached VI using Picture Functions

Please take note that Instead of Drag & Drop image, this ugly example does it by Click-to-Select & Click-to-Drop 😛

 

Though it is ugly but hope it does give you some ideas... Or, there may be more useful functions for such...

 

PS1: I made use of the Forum's Kudos images and thus attached as well.

PS2: Prior to running the VI, please enter new image paths (path to where the images are stored in your system)

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
2 条消息(共 6 条)
4,364 次查看

I will try. Thank u very much.U have helped a lot of people! U have a good soul...

0 项奖励
3 条消息(共 6 条)
4,350 次查看

maybe using the event of mouse key down will be better?

0 项奖励
4 条消息(共 6 条)
4,347 次查看

 


云上飞 已写:

maybe using the event of mouse key down will be better?


你的这个想法比较好!

 

" 一天到晚游泳的鱼"

labview@263.net

我的个人网站:LabVIEW——北方客栈 http://www.labview365.com
欢迎加入《LabVIEW编程思想》组——http://decibel.ni.com/content/groups/thinking-in-labview
0 项奖励
5 条消息(共 6 条)
4,343 次查看

 


@云上飞 wrote:

maybe using the event of mouse key down will be better?


 

As long as it works, Yes.

 

PS: When creating example, the main purpose is to get the idea and working basic solution, before further optimize the code. I don't usually use event case 🙂 especially when I started using Picture functions even before the event case exist. That's personal habit though 😛

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
6 条消息(共 6 条)
4,331 次查看