> What would be the advantage of not having a focus rectangle in one > particular widget while having it in others? It would confuse the user, > wouldn't it? Or is there a some specific reason I don't understand?
I believe it is quite a common GUI framework feature. Say you have a list of items that you use to select options for a main graphics panel which is where all the action is happening. Users don't want the computer to point out the focus is on the options panel, when they change an option, but instantly return their attention to the the main panel. Cocoa provides a setFocusRingType for all NSView's that you can set to NSFocusRingTypeNone if you don't want it shown. I guess it's a matter of preference though, but it would be nice to have the same choice in FLTK if it isn't too much hassle to add. "Matthias Melcher" <[email protected]> wrote in message news:[email protected]... > > On 14.04.2010, at 16:45, SebHoll wrote: > >>> E.g. clicking on an item in Fl_Browser, giving the widget focus, and >>> then >>> using up-down arrow keys would still change the selected item? >> >> Ah, just tried now, and it doesn't. Hmmmm... >> >> Would the easiest was of adding this functionality be defining a new >> flag, >> say "NO_FOCUSRECT" in Fl_Widget.H, and then change... >> >> void draw_focus() {draw_focus(box(),x(),y(),w(),h());} >> >> ...to... >> >> void draw_focus() { if ( !(flags() & NO_FOCUSRECT) ) >> draw_focus(box(),x(),y(),w(),h());} >> >> As it's quite a minor change, would there be any chance of this be adding >> officially? > > What would be the advantage of not having a focus rectangle in one > particular widget while having it in others? It would confuse the user, > wouldn't it? Or is there a some specific reason I don't understand? > > If you don't like the focus rectangle, you can disable it for the whole > application, for example if you use a touch screen. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

