Re: How to fully expand a widget within a window?



> On Fri, 15 Sep 2006 01:46:43 -0500, Murray Cumming <murrayc murrayc com>
> wrote:
>
>>
>>> However you add widgets to show they are properly and nicely packed in
>>> a
>>> window. But they are not affected as soon as you start resizing Window.
>>> The
>>> only remedy I've found is to connect method to signal_check_resize() of
>>> the
>>> main window:
>>
>> Widgets should automatically expand to fill available space, when you
>> have
>> specified that. You should, for instance, investigate the
>> Gtk::Box::pack()
>> parameters.
>
> I do not agree. Gtk::Box::pack() parameters work only for initial packing.
> Once you change window size nothing happens to widgets. They are left in
> exactly the same layout. In order to solve this resize_children() should
> be called while or after resizing.

GTK+ works via automatic layout. I suggest that you play with Glade to
explore how the packing options change the behaviour. I have never used
resize_children().


Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]