Home » Community » Newbie corner » using a file chooser (dir chooser??) to get a dir and not a file
using a file chooser (dir chooser??) to get a dir and not a file [message #32742] |
Sun, 05 June 2011 11:41 |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
How do you choose a directory rather than a file?
I have been using this code to choose a file:
FileSel fn;
void OpenAction() {
fn.AllFilesType();
String filename = fn;
fn <<= Nvl(r_d, recent_dir);
if(fn.ExecuteOpen()){ // file chooser
workdirField<<=Value(fn);
r_d = fn;
recent_dir = ~fn;
}
// work.Run(THISBACK(Work));
}
How can this be done to select a directory?
Is all I want to do is display the path and use that like:
cd C:\0-Neil\FAA\2011\Sectionals
I could parse the String filename but that would require a user to pick a file in that directory rather than just pick a directory. In some apps a directory can be chosen instead of a file.
Is there something built into U++ that can just select a directory??
[Updated on: Sun, 05 June 2011 13:20] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed Jun 12 11:18:15 CEST 2024
Total time taken to generate the page: 0.02155 seconds
|