Re: [gtkmm] A small doc question



>Am Mit, 2002-10-16 um 21.30 schrieb Jussi Pakkanen:
>> 
>> Currently the gtkmm 1.2 -> 2.0 porting guide says:
>> 
>> Change Gtk::Widget::set_usize() to set_default_size()
>> 
>> Shouldn't this be set_size_request instead of
>> set_default_size?
>
>Right, it should be set_size_request().  set_default_size() is a
>Gtk::Window method.  This should be fixed.
>
>However, you should generally try to avoid set_size_request() unless
>it's absolutely necessary, since it won't allow the user to shrink the
>widget below that size.  Having a proper container layout makes it
>usually sufficient to call set_default_size() on the main window.

this simply isn't true. there are all kinds of cases where you need to
specifically size the widget. a trivial example is a non-editable
Gtk::Entry widget intended to display one of a list of strings. you
cannot get the right effect (if the right effect is "a text widget
which doesn't change its size when its contents change") without
set_usize() or its gtkmm2 equivalent.

--p



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