Hello, I want to layout my window by hand.
I have a window, it has say 3 buttons, and 2 groups each containing
buttons.
Goal is to set x y w h of all elements by hand whenever size of window
changes.
(In addition, if possible, I would like to have one of the group use default
layout)
How to?
I thought - do cMyWindow : public fltk::Window
and
void cMainWindow::layout() {
button1->w(20); ... h... x... y
button2->w(20); ... h... x... y
// inside group1
button_A_1->w()
group2->layout();
fltk::Window::redraw();
}
But if I do that, then the window is not redrawn at all.
if I do:
void cMainWindow::layout() {
button1->w(20);
fltk::Window::layout();
}
then button1's width is resized (say, increased) to more then 20.
void cMainWindow::layout() {
fltk::Window::layout();
button1->w(20);
}
then button1 appears to be drawn 2 times, with width 20 and then with width
as it is set by default layout code (scaled).
----------
So, how to write custom ::layout() (or other function) so that I will set
w,h,x,y of all elements by hand, and then fltk will just redraw it all
leaving size as I set it?
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk