From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Drag and drop

Hi,
I have a CVI application running on a touchscreen computer.
I use FileSelectPopup for the user to select a file.
The problem with the touchscreen is that sometimes, the user moves the files
from one directory to another by mistake (due to wrong use of the
touchscreen).

Is there a way to disable 'drag and drop' in a FileSelectPopup?

Thanks,
Marco
0 Kudos
Message 1 of 4
(2,842 Views)
Hello

This is not something you can disable by default for the file dialog. Your best bet would be to create your own custom file dialog in the cases where you think the user might accidently drag-drop items. You might also want to look into using the Windows SDk functions to create the custom file dialog for you. This link talks about something similar, you'll prbably need to clean up some of the code for remove some of the C++ stuff, but it seems most of the functionality is using the C SDk functions


I Hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(2,842 Views)
Marco,

If you are using CVI 7.0 you can also use the file browser control to redesign your file select dialog; you can find it in "Custom Controls >> Toolslib Controls >> File Browser". When you place it in your UI and go to the operate tool you'll see how it automatically populates the control with all the files; and there is no drag and drop implemented; also in this control you'll be able to change the font size to make things easier for the users on a touch screen.

Hope this helps!

Juan Carlos
N.I.
0 Kudos
Message 3 of 4
(2,842 Views)
Hi,
Thanks for your help, I am still using CVI6, so I'll go for the SDK
solution.
The link you gave me looks really interesting.
once again, thank you Bilal, thank you Juan Carlos.

Marco


> Hi,
> I have a CVI application running on a touchscreen computer.
> I use FileSelectPopup for the user to select a file.
> The problem with the touchscreen is that sometimes, the user moves the
files
> from one directory to another by mistake (due to wrong use of the
> touchscreen).
>
> Is there a way to disable 'drag and drop' in a FileSelectPopup?
>
> Thanks,
> Marco
>
>
0 Kudos
Message 4 of 4
(2,842 Views)