yu zhiqiang wrote:
> As the demo program follows, the button' callback could not resize the input
> widgets, why?
Whenever you change the size or position of the child of a Group,
you should call the Group's init_sizes() method so that it knows
about the position change:
http://fltk.org/doc-2.0/html/classfltk_1_1Group.html#dde626fecc1b50fa9f8d7f8a23fcff49
Otherwise the Group will still have the child widget's old positions
recorded.
To fix your program, just add this line:
void button_cb (Widget *w, void* v) {
g* s = (g*)v;
s->input->resize(40,100, 40, 120);
s->init_sizes(); // ADD THIS LINE
s->input->show();
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk