LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Expected Drag &drop function in CVI

I have a CVI program which simulates windows explorer and lists file structure(Using list control). I do hope to have a function that I can drag and drop file in that list control to another CVI program panel. I'm wondering whether I could have the possibility to do this in CVI, or similiar solution?


Thanks!
Jacky
0 Kudos
Message 1 of 2
(3,044 Views)

Hello Jacky,

you can enable Drag&Drop for a panel by using the EnableDragAndDrop function from the Programmer's Toolbax library. Now, when a file (or multiple files) are dropped into the panel, the panel's callback function will be launched with the EVENT_FILESDROPPED event. The eventData2 parameter contains a pointer to the coordinates where the files are dropped on the panel. Use these coordinates to check if the files are dropped on the list control. The parameter eventData1 points to the list of files that have been dropped. Also note that enabling Drag&Drop is not possible for child panels. To clearify, I wrote a small example for you.

Success,

Wim

Message 2 of 2
(3,038 Views)