LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help on drag and drop function

Hi guys,
 
I have a problem creating a drag and drop function for a certain task. The task is as stated below:
 
1. Create a VI that enables a user to drag and drop multiple image files into it.
 
2. I was thinking of storing all the file names into an array of file names
 
3. VI will then convert the image format into an array of 1024 by 768 binary numbers.
 
Task number 3 I have already done but I'm struggling with this drag and drop function (Task 1 and 2) and I have read a couple of entries regarding drag and drop function but none fits my specifications.
 
In the meantime I can only allow 1 file to be opened by a user at a time and it is quite frustrating if the user has to open like 10 files. He will need to navigate to the folder, select the file, click ok and repeat this for 10 times.
 
Hence, I need your help to guide me to create a drag and drop function that allows me to open a file and select all the images 1 want at 1 time.
 
Further information: I am using IMAQ to do the image processing.
 
Thanks in advance.
 
From
 
Ridwan
 
0 Kudos
Message 1 of 10
(4,003 Views)

Hi Ridwan,

from where do you want to drag the images into your vi? Is it another vi, or do you want to drag the file name from a listbox to an image control and show the selected image?

Mike



Message Edited by MikeS81 on 07-07-2008 09:44 AM
0 Kudos
Message 2 of 10
(4,000 Views)

Hi Mike,

I am using LabVIEW to interface with a projector using an API provided by the vendor.

How the VI works is as stated below:

Firstly, before the user runs the VI, he has to indicate how many pictures he intends to load so that when the VI runs, the projector can allocate sufficient memory for the pictures to be loaded.

After this, how I envision the program to work is that after the user clicks on run, a folder option will open from windows. The user will then select all the files he wants and maybe double click it or maybe drag and drop into a listbox (I don't know how to use a list box also). Then the IMAQ will start processing the files.

Anyway, thanks for the prompt reply Mike. This problem has been plaguing me.

Ridwan

0 Kudos
Message 3 of 10
(3,993 Views)

Hi Wan81,

you can use an array of path control. A path control allows to drag a file into it.

Hope it helps.
Mike

Message 4 of 10
(3,981 Views)
Yes, but you can only drop one file at a time.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 5 of 10
(3,966 Views)

Hi guys,

I guess Ton is correct. I've tried an array of path already but it does not enable me to drag and drop multiple files at the same time because you can only open 1 file at a time right?

Really not sure how else i can implement drag and drop of multiple files.

Ridwan

0 Kudos
Message 6 of 10
(3,930 Views)
The Gtoolbox has sourcecode for this.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 7 of 10
(3,916 Views)

Hi Ton,

I've been to the GToolBox Website and which VI should I try to implement this drag and drop of files function?

 

Thanks again in advance

Ridwan

0 Kudos
Message 8 of 10
(3,905 Views)

Oh Wookay,

Found it. It is a revised VI. Will give a try later in my lab and update on my progress.

Thanks Ton for the link

Ridwan

0 Kudos
Message 9 of 10
(3,904 Views)
Hi Ton,
 
There's an error when I tried opening the VI because I am using LabVIEW 8.2 whereas the version of the VI on the website is 5 I guess from the error message shown.
 
Is there any updated VI?
 
Thanks again
 
Ridwan
0 Kudos
Message 10 of 10
(3,880 Views)