leowang wrote:
> I create a simple window, in this window, it has a button. I found that when 
> I hide this button, it will redraw the whole window. why?
> 
> 
> I think it only need to redraw the button area is enough.
> 
> my fltk version is fltk-2.0
> 
> could someone give me a reason about this? thanks

I can't tell you a real reason, because I'm not using FLTK 2 and I
don't know the code well enough to tell, but:

There is the possibility that any widget has a label outside of its
box dimensions. Thus when hiding a widget, it is likely that FLTK
(1 and/or 2) will draw the whole enclosing (Fl_)Group widget.
If you have only a simple window with a button, then this enclosing
group is the whole window.

If you want to reduce flickering, you can either use a smaller
enclosing group or use a DoubleWindow (Fl_Double_Window).

Please note that something of this is just educated guessing
with some FLTK 1 code knowledge in mind ...

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

Reply via email to