MacArthur, Ian (SELEX GALILEO, UK) wrote:
>> I am trying to build a browser where the items in the list 
>> are themselves widgets. I am running into numerous problems, 
>> probably because I'm not doing it right. Before I spend too 
>> much time on this, I was wondering if maybe someone has done 
>> something similar before and is willing to share some code. 
>> Or if someone would be able to give me some useful comments, 
>> I would really appreciate it.
> 
> I see Greg has already pointed you to some worked example, but you could
> probably try an Fl_Tree widget as an alternative.
> Assuming you are using 1.3.x of course...

        Fl_Tree does support child widgets, but I'd only recommend going
        the Fl_Tree route if 'indented' and 'collapsible' are needed.

        Otherwise, if you really just need a 'browser' in the form
        of a vertical stack, I'd think an Fl_Scroll containing an
        Fl_Pack of Fl_Group's (one group per 'line' in the browser)
        would be what you'd want. (Note the example I posted skips
        the Fl_Pack and does the 'stacking' itself)

        Whether you go that route or with Fl_Tree, in either case
        you'd want your widgets to be in an Fl_Group that is probably
        a custom class of your own derived from Fl_Group.
        This way you can create one instance of this custom group
        for every 'line' in the browser.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to