On 14.06.2011, at 17:16, asif saeed wrote:
> Sorry, actually this is the code (previous code was just a mess after I
> randomly tried to make things work in vain):
>
> int main(int argc, char **argv)
> {
> Fl_Group::current(NULL);
> // Fl_Window *w = new Fl_Window(0,0,0,0);
>
> Fl_Group *flow_panel = new Fl_Group(2,2,100,100);
> Fl_Button *button1 = new Fl_Button(2,2,80,40,"Hello");
> Fl_Window *window = new Fl_Window(2,2,300,300);
"window" is now a child of "flow_panel", not a top level window. I suggest that
you always use "new Fl_Window(width, height);" or even better, make sure that
Fl_Group::current(0L); was called.
>
> Fl_Group::current(flow_panel);
Not needed
> flow_panel->begin();
this does excatly the same as the call above
> flow_panel->add(button1);
> flow_panel->end();
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk