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 » U++ Library support » FileSel&FileList, Path » Display FileName without full path
Display FileName without full path [message #37767] Sun, 11 November 2012 09:05 Go to next message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
I would like to display only the FileName in an EditField rather than the full path.
This is the code now:
		String filename = fn;
		FileIn inF((String)fn);
		Point2<<=Value(fn);


String GetFileName(const char *path);
How is this used in this case?

I tried several variations and just get errors.
Point2<<=Value(GetFileName(fn));
... (*fn)
Point2<<=GetFileName(fn);

cannot convert parameter 1 from 'Upp::FileSel' to 'const char *'
Re: Display FileName without full path [message #37781 is a reply to message #37767] Mon, 12 November 2012 08:40 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Did you try GetFileName(filename) instead of GetFileName(fn)?
Re: Display FileName without full path [message #37789 is a reply to message #37781] Mon, 12 November 2012 15:54 Go to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
I did not try that before but it works OK.

Thanks!!
Previous Topic: Filesel to admit folder names
Next Topic: FileSelector - maximum number of file in one selection
Goto Forum:
  


Current Time: Thu Mar 28 13:09:57 CET 2024

Total time taken to generate the page: 0.01554 seconds