On Jul 4, 2007, at 8:40 AM, Manoj wrote:
> Hi,
>
> FLTK provides file chooser dialog to save/load a file. Is there any
> directory chooser dialog?
Yes, there is an equivalent fl_dir_chooser to the fl_file_chooser. If
you use Fl_File_Chooser of Fl_File_Browser, you can use filetype():
Fl_File_Chooser:
The type argument can be one of the following:
SINGLE - allows the user to select a single, existing file.
MULTI - allows the user to select one or more existing files.
CREATE - allows the user to select a single, existing file or specify
a new filename.
DIRECTORY - allows the user to select a single, existing directory.
The title argument is used to set the title bar text for the
Fl_File_Chooser window.
Fl_File_Browser:
void filetype(int type)
int filetype() const
Sets or gets the file browser type, FILES or DIRECTORIES. When set to
FILES, both files and directories are shown. Otherwise only
directories are shown.
> There is one problem with file chooser dialog. We can create a
> custom filter. Can we disable this custom filter from file chooser
> dialog
The file pattern can be set when creating or opening (using filter)
the file chooser. You can not change the menus later, but you can
change them again before you pop up the dialog the next time. The
format for the pattern is:
"HTML Files (*.html)\tImage Files (*.{bmp,gif,jpg,png})" - just don't
include the ones you do not like.
----
http://robowerk.com/
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk