Here is an excerpt from my nutrition program which contains two horizontal
packs within a vertical pack within a double window.
If you compile it with "fltk-config --compile main.cc" it works perfectly.
But if you compile a second time changing the resize_yes variable at the
beginning of the main function to true so that all packs are resizable to the
groups themselves, everything in the second horizontal pack fails to work. The
light buttons go dead and the tooltips do not show.
I am running slackware 13.37 with kernel 2.6.37.6 on a 686 with gcc 4.5.2 and
X.Org X Server 1.9.5. My fltk version is fltk-1.3.x-r9143.
Any ideas?
Thanks,
Jim
/* main.cc */
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Pack.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Light_Button.H>
#include <FL/Fl_Value_Output.H>
int main(int argc, char **argv)
{
//int resize_yes = 1;
int resize_yes = 0;
int w = 1012;
int h = 625;
int leftspacer = 29*w/128;
int x = 0, y = 0;
Fl_Double_Window *window = new Fl_Double_Window(w,h);
Fl_Pack *settings = new Fl_Pack(x, y, w, h);
settings->spacing(h/23);
if (resize_yes) settings->resizable(settings);
{
new Fl_Box(x,y,w,h/640);
}
{
Fl_Pack *o = new Fl_Pack(x,y,w,h/22);
o->type(Fl_Pack::HORIZONTAL);
if (resize_yes) o->resizable(o);
new Fl_Box(x,y,96*w/128,h/22);
{
Fl_Button *o = new Fl_Button(x, y, 9*w/40, h/22, "Weight Log Regression");
o->box(FL_ROUND_UP_BOX);
}
o->end();
}
{
Fl_Pack *hpack = new Fl_Pack(x, y, w, h/22);
hpack->type(Fl_Pack::HORIZONTAL);
hpack->spacing(w/50);
if (resize_yes) hpack->resizable(hpack);
{
new Fl_Box(x, y, leftspacer, h/22);
}
{
Fl_Box *o = new Fl_Box(x, y, w/6, h/22, "Calories");
o->align(FL_ALIGN_INSIDE|FL_ALIGN_LEFT);
}
{
new Fl_Value_Output(x, y, w/10, h/22);
}
{
new Fl_Box(x,y, w/75, h/22);
}
{
Fl_Light_Button *clock = new Fl_Light_Button(x, y, w/15, h/22, "LOCK");
clock->tooltip("When locked, value can't be reset from the analysis screen");
}
{
new Fl_Box(x,y, w/150, h/22);
}
{
Fl_Light_Button *alock = new Fl_Light_Button(x, y, 2*w/19, h/22, "AUTO-SET");
alock->tooltip("Blah, Blah, Blah.");
}
hpack->end();
}
settings->end();
window->end();
window->resizable(window);
window->show(argc, argv);
return Fl::run();
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk