Home » Community » Newbie corner » using a file chooser (dir chooser??) to get a dir and not a file
Re: using a file chooser (dir chooser??) to get a dir and not a file [message #32749 is a reply to message #32745] |
Mon, 06 June 2011 03:24   |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
Thanks Honza
I saw that but it gives no example code of how that is used.
Ecxuse me but I am not sharp enough to decipher this into usable code:
Quote: | bool ExecuteSelectDir(const char *title = NULL)
Executes directory selection dialog. title can specify alternate caption of dialog. If user selects a file to open, returns true.
|
It looks like it returns a bool of true only if a specified ("file name") exists and not actually choosing a directory
I did a search in the forum for "ExecuteSelectDir" and found threads like this:
http://www.ultimatepp.org/forum/index.php?t=msg&goto=314 13&&srch=ExecuteSelectDir#msg_31413
which had posts that included code like this:
FileSel fs;
fs.ActiveDir("C:/Test");
if (!fs.executeselectdir("Ouvrir à partir de ..."))
return;
String selectedFolder = ~fs;
Trying code similar this there were errors like "it doesn't take 0 parameters".
After searching and trying for several hours I posted for help.
In Java it can be done with this"
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
Do you have a U++ code example or a link to code I could try?
[Updated on: Mon, 06 June 2011 05:48] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon Jul 07 16:07:59 CEST 2025
Total time taken to generate the page: 0.02756 seconds
|