LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to open the file in a tree control

I use a tree control to list all files in a selected directory, I checked the sample with LV (Directory hierarchy in tree control.vi) and want to add a function like following: Atfer listing all files, if I click a file listed in the tree control, the computer can open the file automaticly.
0 Kudos
Message 1 of 7
(3,242 Views)

Hi,

please see the attached picture. It shows how you get the entire path of the selected file.

 

Mike

0 Kudos
Message 2 of 7
(3,237 Views)
Thanks a lot, Mike. then how can I open the file with the entire file path?
0 Kudos
Message 3 of 7
(3,228 Views)

Hi,

you can use the "String to Path" function, then you can open it. What type of file do you want to open, or what to you want to do with it? Is it a vi?

 

Mike

0 Kudos
Message 4 of 7
(3,216 Views)
Hi Mike, the file format maybe: word, excel, PDF, TXT and so on. If i click the file then the computer automaticly call the corresponding program to open the clicked file.
0 Kudos
Message 5 of 7
(3,211 Views)

Hi,

you can use the "Open URL in Default Browser.vi" to open all the files you select in your tree.

 

Mike

Message 6 of 7
(3,206 Views)
Hi Mike, thanks a lot.
0 Kudos
Message 7 of 7
(3,186 Views)