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 determine the file type selected in a FileSel widget? [SOLVED]
How to determine the file type selected in a FileSel widget? [SOLVED] [message #2864] Fri, 28 April 2006 14:20 Go to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

my application now needs to open a database (a text file with .txt or .csv extension) and process it according to its internal format that are two for each extension.
So I've 4 formats but only two extentions. This means that the only extension do not give me the possibility to remove the ambiguity.
For my purpose would be enough if I could simply get from the FilSel widget what type file the user selected. In fact I set:
fs.Type( "Files FIDE archive (text)", "*.txt")
  .Type( "Files VEG (csv)", "*.csv;")
  .Type( "Files FSI Italy (csv)", "*.csv")
  .Type( "Files fixed lenght (text)", "*.txt")      
  .DefaultExt("txt");

Is there a way to return the string (or the index) of the .Type() the user select? I couldn't find an appropriate method while it is easy to get the extension:
String  ext = ToLower( GetFileExt( filename ) ); // GetFileExt is in Core/Path.h


Thank you,
Luigi

[Updated on: Mon, 01 May 2006 13:18] by Moderator

Report message to a moderator

 
Read Message
Read Message
Previous Topic: How to open a FileSelect widget and select a file?
Next Topic: Disable MkDir
Goto Forum:
  


Current Time: Tue May 14 07:05:09 CEST 2024

Total time taken to generate the page: 0.02099 seconds