Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
nlneilson is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: reading & writing a file
Next Topic: Restricting GridCtrl Selection to just One row
Goto Forum:
  


Current Time: Wed Jun 12 11:18:15 CEST 2024

Total time taken to generate the page: 0.02155 seconds