On 25.04.2012, at 15:52, MacArthur, Ian (SELEX GALILEO, UK) wrote:

>> I use the browser widget to display files, and the files are sorted by
>> name, it looks like follows:
>> 
>> a
>> a.txt
>> ab.txt
>> b.txt
>> c
>> ch.txt
>> 
>> so the lines which has index character should not be focused.
>> Now I have implement this function by modify Fl_Browser.cxx and
>> Fl_Browser_.cxx.
> 
> OK... would Fl_Tree not be a more natural container for that sort of thing 
> then, anyway?

You can also use a combination of groups and a widget hierarchy to create that 
effect:

To make a scrollable list, start with an Fl_Scroll. Inside the Fl_Scroll, put 
an Fl_Pack as the only child. Set the type to VERTICAL. Then generate an 
Fl_Toggle_button for every entry in you list. The Fl_Pack will keep the buttons 
neatly arranged, and keyboard navigation should work just fine, You now have 
full controll over every toggle button, including hide() or deactivate().

 - Matthias
_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to