imm wrote:
> 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 */

Yes, that's basically what I am trying to achieve. I am going to review my
layout and see what I'm doing wrong.

Thanks!

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

Reply via email to