LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Mads

Remove Save-button from file dialog when browsing for folders

Status: New

File dialogs that have been set to only browse for folders should only have 2 buttons, one to cancel and one to select the current directory:

 

folder select.gif

8 Comments
Knight of NI

You happen to be showing the result on Windows, so I don't know what it looks like on a Mac or on Linux. With those settings what's actually being called is the standard Windows Save As dialog. If you selected "Existing" then it would be calling the standard Windows Open dialog (so the "Save" button would be "Open"). LabVIEW can't change the standard dialogs so there are 2 options:

1. Create a custom dialog that's platform-independent.

2. On Windows at least, call the function that displays the dialog for selecting a folder (SHBrowseForFolder). 

altenbach
Knight of NI

When browsing for folders, we should get the appropriate dialog that does not involve files.

 

A detailed discussion and some ideas are posted in this thread.

Knight of NI
Note: I think my comments regarding the options were misunderstood. They were intended for NI engineers to implement in the file path control, not for a user to implement. I agree that it makes no sense to display files when trying to select folders. I was pointing out that LabVIEW is simply calling into the operating system (whichever that is), and it can't change what the operation system is creating. Thus, any kind of change would require that NI engineers either create a custom dialog that's platform independent that gets called when you click the browse button (like the VI that gets called with the timestamp control's select date button), or they call the appropriate OS function to display the "folder-only" browser.
Mads
Active Participant

There is a contradiction in your statements smercurio; you say NI is just calling an OS function..(indirectly saying it's not their "fault") - but as you say yourself, it's not the correct function - so there really is no excuse...

Knight of NI

What contradiction? You wanted NI to change the dialog by removing a button. I'm describing the situation as it currently is, and simply pointing out that you cannot change the existing dialog as you initially wanted because they're just calling the standard dialog. I am not saying it's not their fault, either directly or indirectly. Please do not put words into my mouth.

 

I followed up by indicating that I think one alternative is for NI engineering to call a different dialog (at least on Windows). There's a difference between trying to change something, and simply accessing a different dialog that already exists to select just folders. Also, this needs to be looked at for the other operating systems. Does it work the same way under a Mac and Linux? If so, does the same possibility exist on those OSes? If not, then the only recourse may be for NI to create a custom dialog to select a folder that's platform-independent. NI can't put on the Windows-only blinders on this, so simply saying that NI just has to call a different OS function may not be a sufficient or adequate way of changing this.

 

I am not disagreeing with you, nor did I ever disagree. In fact, I actually Kudoed the idea. Like I said, my initial comments were not well-stated so they could have been misconstrued as indicating the burden is on the user, which it is not.

TCPlomp
Trusted Enthusiast

One thing to mention, you can change the text on the button.

 

If you rename it to 'select' and the user has a folder high-lighted there is no strange behaviour if the button is used.

 

 

Note: LabVIEW has allready a platform independent dialog.

The easisest method to see the dialog is to browse into an LLB folder/file.

 

It can be set to use with the following token:

useNativeFileDialog=false

 

Ton

Message Edited by TCPlomp on 27-12-2009 06:30 PM
Message Edited by TCPlomp on 27-12-2009 06:33 PM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Mads
Active Participant

Here's one way of solving this today...but the whole point of course is that such a thing should not be necessary, the file dialog that comes with LV should simply call the correct system dialog instead.

shb
Active Participant
Active Participant

I had to explain to customers how to select a folder. They were stuck because the save button did not do anything.

So please kudo this idea. (And also others marked with the tag File_Dialog.)