On 05/05/12 01:04, Greg Ercolano wrote:
> On 05/04/12 22:22, Jim Jozwiak wrote:
>> If I take the pack.cxx example from the fltk test subdirectory and mark the
>> Fl_Pack resizable to itself with the expectation that the buttons inside the
>> pack will now resize, I find the buttons don't resize. How would one
>> achieve this functionality in fltk, that widgets inside a pack inside a
>> scroll would themselves resize in proportion to the main window?
>
> I believe the whole point of a scroll is to disconnect
> resizing of the parent from the children, so that the
> children can maintain their size, so that scrollbars can
> control their view.
>
> If you want the pack to resize with the parent,
> put it in a group instead of a scroll.
>
> If you really want the pack inside a scroll, and have the
> parent window affect the pack, then I'd suggest deriving
> your own class from either the scroll or the window
> (which ever is most appropriate in your case), then
> override the resize() method, and have it tell the pack
> how big you want it with resize(). Call init_sizes()
> if needed.
Oh, and I should add, that's more or less what this example does:
http://seriss.com/people/erco/fltk/#ScrollableWidgetBrowser
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk