On 06/03/11 18:00, anon wrote:
> I'm struggling to find out how I can have a Fl_File_Browser
> that actually selects items when clicked on.

        It sounds like you want Fl_File_Chooser.

        See the test/file_chooser example program.

        Or, if you want your native OS's file chooser,
        use Fl_Native_File_Chooser.

        I don't know what Fl_File_Browser is, I've never
        needed it. I think it's some low level class that
        the Fl_File_Chooser uses to do its thing.

> I read in the Fl_Browser doc/header that the Fl_Browser itself
> (yes, I don't mean Fl_File_Browser here) does not provide
> automatic item selection,

        (Different subject: Fl_Browser)

        It actually does.. it's just not documented.
        The docs want you to use the meta classes
        (eg. Fl_XXX_Browser) to access the selection options.

        Fl_Browser's default behavior is to literally be
        a browser, not a selector, and the docs want you
        to use the meta classes to access the different
        selection options.

        But you can use plain old Fl_Browser, and make it
        act like a selector by setting its type(), eg:

                Fl_Browser brow(..);
                brow.type(FL_MULTI_BROWSER);

        ..which is I think all that eg. the Fl_Multi_Browser
        class does; just inherits from Fl_Browser and initializes
        the type() to FL_MULTI_BROWSER.

        The other classes that derive from Fl_Browser work
        similarly.

> but other subclasses like
> Fl_Hold_Browser, Fl_Multi_Browser, and Fl_Select_Browser do.

        Right, they essentially do the above.

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to