george seifert Posted October 29, 2008 Report Share Posted October 29, 2008 I'm just wondering if this is possible before I spend a lot of time on it. A quick trial and a search got me nowhere. I'd like to drag a filename from a Listbox in one VI and drop it in a Path control in another VI. Is it possible? As a backup I tried to copy the line from the listbox and paste it into the path control, but it wouldn't let me paste into the path control. Any hints to get me going? George Quote Link to comment
LAVA 1.0 Content Posted October 29, 2008 Report Share Posted October 29, 2008 Off course this is possible.... However not directly in LabVIEW. The path control can receive (single) path's drag and drops. Sending one to an OS is not trivial (please correct me if I'm wrong). The G-toolbox has some VIs that can do this. I haven't used them (yet). Ton Quote Link to comment
Francois Normandin Posted October 29, 2008 Report Share Posted October 29, 2008 QUOTE (george seifert @ Oct 28 2008, 09:32 AM) I'm just wondering if this is possible before I spend a lot of time on it. A quick trial and a search got me nowhere. I'd like to drag a filename from a Listbox in one VI and drop it in a Path control in another VI. Is it possible? As a backup I tried to copy the line from the listbox and paste it into the path control, but it wouldn't let me paste into the path control. Any hints to get me going? George Hi George, I might have a workaround... You can drop the filename to a string in an other VI but not to a path. However, if you make an XControl with String (which you convert to Path) you can make it happen. Here is a screenshot of what it looks like in the simple test I ran. http://lavag.org/old_files/monthly_10_2008/post-10515-1225224714.png' target="_blank"> Quote Link to comment
Mellroth Posted October 29, 2008 Report Share Posted October 29, 2008 QUOTE (george seifert @ Oct 28 2008, 02:32 PM) I'm just wondering if this is possible before I spend a lot of time on it. A quick trial and a search got me nowhere. I'd like to drag a filename from a Listbox in one VI and drop it in a Path control in another VI. Is it possible? As a backup I tried to copy the line from the listbox and paste it into the path control, but it wouldn't let me paste into the path control. Any hints to get me going? George It is possible directly in LabVIEW. 1. Use an event structure and filter the event "Drag Starting?" 2. in this event, find the drag data named LV_TEXT 3. convert the drag data from variant to string, and then to a path 4. add an additional drag data element with drag data set to the path, and set drag name = LV_PATH http://lavag.org/old_files/post-5958-1225226246.vi'>Download File:post-5958-1225226246.vi /J Quote Link to comment
george seifert Posted October 29, 2008 Author Report Share Posted October 29, 2008 Thanks for the help. I decided to go another route. In the VI with the Path control (destination) I monitor the Listbox for a double-click via a dynamic event. Then I just grab the clicked line and put it in the Path. I think it's even easier for the use than the drag and drop I wanted originally. George Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.