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 » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » Tip: Using FileSel
Re: Tip: Using FileSel [message #5977 is a reply to message #5950] Thu, 26 October 2006 05:34 Go to previous message
yeohhs
Messages: 75
Registered: November 2005
Location: Malaysia
Member
Hi,

Thanks to Mirek, this revised code is better.

	FileSel f;                             // create a FileSel object
	String curdir = GetCurrentDirectory(); // get the current folder
	f.ActiveDir(curdir);                   // set folder to look in               
	f.Type("Text file", "*.txt;*.log");    // set file types to filter
	f.ExecuteOpen("Select a text file");   // display the File Selection dialog
	String fs = f.Get();                   // get a file name
	String s;                              // create a String object 
	s = LoadFile(fs);                      // load the file into a string
	mydocedit1.Set(s);                     // display the file in a DocEdit control
	mylineedit1.Set(s);                    // display the file in a LineEdit control


 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: enumCharSet() funtion
Next Topic: Vector of Vector
Goto Forum:
  


Current Time: Mon Aug 04 03:01:07 CEST 2025

Total time taken to generate the page: 0.06069 seconds