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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Solved!
Go to solution

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

0 Kudos
Message 1 of 6
(4,825 Views)
Solution
Accepted by topic author 云上飞

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
Download All
0 Kudos
Message 2 of 6
(4,801 Views)

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

0 Kudos
Message 3 of 6
(4,787 Views)

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

0 Kudos
Message 4 of 6
(4,784 Views)

 


云上飞 已写:

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 Kudos
Message 5 of 6
(4,780 Views)

 


@云上飞 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 Kudos
Message 6 of 6
(4,768 Views)