On 5 Oct 2007, at 18:21, Alvin wrote:

> How can I make an Fl_Tile automatically resize its and its children  
> when the
> Fl_Double_Window (its parent) resizes?
>
> Inside the Fl_Tile, I have two other widgets stacked vertically.  
> When the
> apps appears, I can move the divider between the two widgets.  
> However, when
> I resize the app, the Fl_Tile doesn't grow.

Does this not "Just Work"? I'm probably missing the point of what you  
are trying to do...
Anyway, here's a "worked example" cut down from tile.cxx that seems  
to do what I think you are asking.

------------------
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Tile.H>
#include <FL/Fl_Box.H>

int main(int argc, char** argv)
{
   Fl_Window window(320, 320);
     Fl_Tile tile(10, 10, 300, 300);
       Fl_Box upper_box(10, 10, 300, 150, "upper");
       upper_box.box(FL_DOWN_BOX);
       upper_box.color(9);
       upper_box.labelsize(36);
       upper_box.align(FL_ALIGN_CLIP);

       Fl_Box lower_box(10, 160, 300, 150, "lower");
       lower_box.box(FL_DOWN_BOX);
       lower_box.color(12);
       lower_box.labelsize(36);
       lower_box.align(FL_ALIGN_CLIP);
     tile.end();
   window.end();
   window.resizable(tile);
   window.show(argc,argv);
   return Fl::run();
}

/* end of file */



_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to