Hello,
I read the resizable group manual
http://www.fltk.org/documentation.php/doc-1.3/Fl_Group.html#Fl_Group.resizable
but this seems to be not sufficient for some designs.
How to do following design:
Three panels, A, B, C.
Each panel use 100% of height.
And width is divided between them equaly.
*but* I want 5 pixel spacing between panels and the window, and inside
between panels.
Usually if I would set their sizes like:
marg = 5;
width = (parent->w()-marg*4) / 3; //
a->x(marg + width); a->w(widrg);
b->x(marg*2 + width*2); b->w(widtg);
c->x(marg*3 + width*3); c->w(widtg);
then the margines (5) would also scale, when scaling the parent window.
How to solve this?
Also, I find it easy to by hand assign positions and sizes of all
elements... how exactly to write code that will have my_layout called when
window resizes?
Widget *A, *B, *C;
void my_resize() {
A->w(...); A->h(...); A->x(...);
}
int main() {
Window *window = new Window(allW,allH);
window->begin();
A = new Group ....
B = new Group ...
...
window->end();
...
fltk::run();
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk