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.
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.
01-26-2016 10:17 AM
Is there a way to configure the LabView brose dialog to show all files but only allow selection of existing paths (Like folders only selection mode)? I have many paths to choose from and I would like the user to be able to see the files within those paths (So they know they're selecting a populated path) but I don't want them to select those files.
Thanks,
XL600
Solved! Go to Solution.
01-26-2016 10:26 AM - edited 01-26-2016 10:26 AM
I asked this question a while ago and decided it was too much work for my project just for this functionality.
Like GerdW said, you can proabably find a Windows-style folder browser to use instead of the LabVIEW folder browser
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
01-26-2016 10:51 AM
HI xl600,
You can use strip path when user select a file and force the path value.
I made you a VI.
01-26-2016 10:57 AM - edited 01-26-2016 10:59 AM
This isn't the ideal solution because it allows the user to select files as well as folders, but it re-opens the dialog if they do so. I don't like the idea of stripping the path if they select a file because it forces the user's hand.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
01-26-2016 10:59 AM
That should work. I was looking into the .NET approach to restrict selection to folders only (Not even allowing the user to click on a file within the current path) but like James pointed out, that's a lot of work for a minor convienence.
Thanks!
01-26-2016 11:03 AM
If you ever dive in to more .NET stuff, post back here. I tried the FolderBrowserDialog option, but I've always hated that interface, so I stuck with my loop above.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
01-26-2016 11:15 AM
I will. I was googling and found this tool
Alas, it takes an act of congress for my company to authorize external code libraries (Let alone pay for them).
Sigh....
01-26-2016 11:24 AM
Ah yes, the struggle is real.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
01-26-2016 11:25 AM
What I do instead:
Works great for my purpose.
(I typically place the files of the selected folder into a listbox, so if the user clicks a file instead, it even sets the listbox to the selected file afterwards. Example)
01-26-2016 11:55 AM
@xl600 wrote:
I will. I was googling and found this tool
Alas, it takes an act of congress for my company to authorize external code libraries (Let alone pay for them).
Sigh....
I'm not sure why you think you need to pay for it. Your link says it's part of .NET. I don't know that specific component, but you can find an example of calling the parallel Win32 API function in this discussion - http://forums.ni.com/t5/LabVIEW/Browse-for-Folder-dialog/m-p/301237#M157254
If you don't want to call external code, you can do this yourself by building the tree, but that would require some code.