> Two problems that I can see:
> 1. container1 is an Fl_Double_Window, so when you create it,
> it becomes
> the current group, so container2 is added to container1 and not to
> your MySplitter widget. Add an end() after container1->color line
> and a begin() before the container2 allocation.
Oh yes - I never spotted that one... Good call.
> {
> begin();
> container1 = new Fl_Double_Window(x, y, w / 2, h);
> container1->set_non_modal();
> container1->box(FL_DOWN_BOX);
> container1->color((Fl_Color) FL_RED);
> end(); // <- added
Maybe something like:
container1->end();
Would make it more obvious what was intended here?
> begin(); // <- added
Possibly
this->begin(); // rather than just begin();
although it's the same... I thought it might be clearer what is being
done?
> container2 = new Fl_Double_Window(x + w / 2, y, w / 2,
> h); // <- changed
> container2->set_non_modal();
> container2->box(FL_DOWN_BOX);
> container2->color((Fl_Color) FL_BLUE);
Maybe add a:
container2->end();
Here too, just to be explicit...?
> end();
> }
>
> Fl_Double_Window* container1;
> Fl_Double_Window* container2;
> };
SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk