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 » How to open a FileSelect widget and select a file?
How to open a FileSelect widget and select a file? [message #2697] Fri, 21 April 2006 22:59 Go to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Now it is time to read the data from a file (and later save them). So the first step is to select one.

Spying in the available code I've found in UWord package some useful code. I copied, without understand, in VegaMain.h
FileSel& UWordFs()
{
	static FileSel fs;
	return fs;
}

and then created the following method:
void VegaMain::OpenTournament()
{
	FileSel& fs = UWordFs();
	fs.ExecuteOpen();
}

that with my great satisfaction open a fileselect widget. Now I've 2 questions:

1. What have I done? (I do not understand the logic of the first operation... FileSel& UWordFs()...
2. How can I get the selected file, the directory in which it resides, and set a filter? (For example I want to show in the dialog only the file *.txt and *.qtf)

I think when I need to save a file the operations to select a filename are the same.

Thank you,
Luigi

[Updated on: Fri, 21 April 2006 23:01]

Report message to a moderator

 
Read Message
Read Message
Read Message
Next Topic: How to determine the file type selected in a FileSel widget? [SOLVED]
Goto Forum:
  


Current Time: Thu Apr 25 07:00:50 CEST 2024

Total time taken to generate the page: 0.04974 seconds