Jane wrote:

> what widget will generally get focus in the case the active 
> widget is being deactivated? in my case its the first 
> widget in my fluid list. coincidence?

Short answer: yes ;-)

Long answer: It depends, and this is really complicated.

*IF* I read the code correctly (and I'm not sure at all), then the focus goes 
to 
the first widget (see below!) in the window that returns 1 on an FL_FOCUS event 
(when you deactivate the Fl::focus() widget, the Fl::focus() is first set to 
NULL 
(see fl_throw_focus()) and then fl_fix_focus() is called to find a focus 
widget).

Then all widgets in the window are tried, if they want to receive the focus by 
sending them FL_FOCUS. This starts with the last widget in the window, but if 
this is a Fl_Group, it goes down recursively, ..., then the previous 
widget/group 
in the window, until it reaches the first widget or group. If no widget returns 
1, then the window itself gets the focus.

Or similar ...

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

Reply via email to