Alvin wrote:
> Hello,
> 
> How can I make an Fl_Tile automatically resize its and its children when the
> Fl_Double_Window (its parent) resizes?

        Hmm, doesn't Fl_Tile do this automatically?

        The 'resizebox' demo that comes with FLTK show this pretty well
        I think, as well as 'tile'.

        Understanding the "resizable()" stuff (making an invisible box
        with the right dimensions defining which widgets resize, and
        which ones don't) is key to understanding how FLTK's resizing
        behavior can be made to work without overriding resize.

        Matt has a good description here:
        http://fltk.org/articles.php?L415+I0+T+M10+P1+Qresizable

        You can do things procedurally too, overriding FLTK's customizable
        behavior (your second post), but often fltk's own resizable behavior
        can usually be made to work when properly employed.

        For examples of custom resize behavior, see:
        http://seriss.com/people/erco/fltk/#ScrollableWidgetBrowser
        http://fltk.org/newsgroups.php?gfltk.general+v:13522

> I have been trying something like the following but its not working:

        Keep in mind that if you override Fl_Tile::resize(), then you
        probably want to do all management of children and Fl_Tile's
        size/position yourself, /INSTEAD/ of calling Fl_Tile::resize().

        Calling Fl_Tile::resize() will cause FLTK's automatic child
        positioning to take over, which is maybe not what you want
        if you want to do it all yourself.

        If you want to just modify the default resize behavior,
        then after you call Fl_Tile::resize(), and then adjust
        things after that, be sure to call init_sizes(), to make
        sure FLTK updates its cache with your new changes.

        The subject of resizing has been covered quite a bit on the
        newsgroup over the years, especially the older articles from
        2004/2006. Try searching the forum for 'resize', 'resizable'
        and 'resizing', eg:
        http://fltk.org/newsgroups.php?gfltk.general+T+Qresizing

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

Reply via email to