> Hi,
>
> Is it possible to hide the focus rectangle for a particular widget using
> FLTK 1.3's standard API?
>
> The only way I can see to do it, is to override Fl_Widget::draw_focus() but
> this member isn't defined as virtual.  I guess I'm hoping that there's a
> flag I can set to achieve this result.
>
> Any ideas would be greatly appreciated.
>
> Keep up the awesome work guys!  FLTK is a fantastic library.
>
>
> SebHoll
>

Dear SebHoll,
I have implement this in fltk-2.0, but do not know whether it suit for 
fltk-1.3, anyway, my method is as follows:

if you want to hide the focus rectangle of the browser selected item, just do 
not focus the browser widget will be OK.

if you want to hide the focus rectangle of the button widget, you can do as 
follows:

class NoDotNoBox : public Box {
public:
  void _draw(const fltk::Rectangle&) const {}
  void draw_symbol_overlay(const fltk::Rectangle& r1) const {}
  NoDotNoBox(const char* name) : Box(name) {}
};
extern Box* const NO_DOT_BOX;

static NoDotNoBox noBox("none");
Box* const NO_DOT_BOX = &noBox;

Button *btn = new Button(0, 0, 100, 100);
btn->box(NO_DOT_BOX);


Hope it will help you.

Best regards,
Leo Wang
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to