On 6 Oct 2007, at 15:08, Alvin wrote:

> I guess it may have something to do with the main Fl_Double_Window  
> layout
> that I have. I have a several Fl_Group widgets and one Fl_Tile. The  
> Fl_Tile
> is not set to be resizable. I have the resizable widget set to the  
> Fl_Group
> that is the same height and to the left of the Fl_Tile. When I  
> resize the
> Fl_Double_Window all the groups grow according to how the left  
> group grows.
> The Fl_Tile appears not to grow. However, I can see from the printf
> statements in the Fl_MyTile (initial post) that it was in fact  
> growing.

Here's another (longer, sorry) example that I think shows the layout  
you describe - does this work as expected for you?

Anyway - there is one thought; I think that with Fl_Tile you MUST  
ensure that the children fit exactly in the tile, they must have no  
gaps between them and they must fill the tile area. Otherwise the  
tile may not work right. Perhaps that is what is wrong?
If you want your widgets to NOT fit exactly edge-to-edge, I think you  
need to fill your tile with Fl_Groups that do fit perfectly edge-to- 
edge, then put your other non-touching widgets inside these groups.  
Something like that, anyway...

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

static void exit_cb(Fl_Widget *w, void *v) {
   Fl_Double_Window *win = (Fl_Double_Window *)v;
   win->hide();
}

int main(int argc, char** argv)
{
   Fl_Double_Window window(640, 390);

     Fl_Group left_grp(10, 10, 295, 300);
     left_grp.box(FL_DOWN_BOX);
       Fl_Box size_box(20, 20, 200, 205, "resizeable");
       size_box.box(FL_DOWN_BOX);
       size_box.align(FL_ALIGN_CLIP);

       Fl_Box fix_box(230, 230, 70, 70, "fixed");
       fix_box.box(FL_DOWN_BOX);
       fix_box.align(FL_ALIGN_CLIP);
     left_grp.end();
     left_grp.resizable(size_box);

     Fl_Tile tile(310, 10, 300, 300);
       Fl_Box upper_box(310, 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(310, 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();

     Fl_Button ex_btn(540, 340, 70, 40, "Exit");
     ex_btn.callback(exit_cb, (void*)&window);

   window.end();
   window.resizable(left_grp);
   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