LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Folder Path Dialog with All Files Shown

Solved!
Go to solution

Hello,

 

Has anyone here made an ActiveX control, or some workaround, to have a Folder Path dialog that also shows the files in the folders? The LV File Dialog only shows folders if you limit the selection to folders.

Ideally, the browser would look just like the folder browser with the "Select Folder" button, but would also show the files in the folders. A workaround would be to enable Files and Folders and just get rid of the filename from the path if they select "Open" instead of "Current Folder", but this is not ideal.

 

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 1 of 7
(4,088 Views)

Hi James,

 

what's the point in showing files when the user should select a folder?

 

With some searching you should find examples how to access the Windows-style folder browser…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(4,076 Views)

Thanks for the help.

 

The device I'm using outputs files to a directory with folder names that are pretty un-readable. The user has to navigate these folders based on the timestamped files within, or at least it's easier to discern which folder they want by looking at the files.

 

The File Dialog itself is a windows-style folder browser. The only thing different I could find was this. Are you referring to a library-call browser of some sort?

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 3 of 7
(4,051 Views)
Solution
Accepted by topic author James.M

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.

Retry Folder Browse.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 4 of 7
(3,800 Views)

This thread brings up a very good point. I'm not a fan of the Express File Dialog VI, and this thread underscores one of the main design flaws of the File Dialog Express VI.

 

Ideally, when the "Select Folder" option is chosen, the file dialog should display the filenames in the greyed-out/disabled state. That way, the user would have a better mental picture of the file structure (for navigation, and for correct mental model development).

 

In the current implementation, when the software is asking the user to select a folder full of data files, and the user (inadvertently or intentionally) opens the folder containing the data files, the folder appears to be empty. If the user is not entirely sure they have selected the correct folder -- and decides to take a look inside just to be sure -- they are greeted with an empty folder. This is not ideal, as it may lead the user to believe (incorrectly) that the folder is empty. This ultimately degrades the mental model development and the user's understanding of how the system is organized.

 

If the filenames were listed but disabled, the user would correctly understand that the files are not available for selection. At the same time, they would also be given accurate information about the contents of the folder.

 

The current functionality is not particularly good UI design, The elimination of original File Dialog and its replacement with the very limited File Dialog Express VI (with this glaring design error) is a step in the wrong direction. And without the more-capable and generalized File Dialog of previous LabVIEW versions, the workaround is much more tedious than it once was.

 

Good UI design matters. (Not all users are engineers with a greater tolerance for arcane and unclear UI experiences.)

Message 5 of 7
(3,226 Views)

Here's another workaround that prevents the re-opening of the dialog. (If the user doesn't understand that they have done something wrong by selecting a file, they may select a file again...!)

 

In the attached solution, the filename is stripped from the path, and the path is chosen.

 

Ideally, the filenames would be greyed-out and disabled, and the button text would be more coherent (or at least, editable -- the file dialog express VI only allows you to specify one of the buttons. If you have selected "New or Existing", the button text is locked on "Save", which may be completely out of context for the situation in which it was called...)

 

In any event, here is another mediocre solution, but one which prevents multiple file dialogs from opening.  

0 Kudos
Message 6 of 7
(3,231 Views)
0 Kudos
Message 7 of 7
(3,228 Views)