Re: [gtkmm] A small doc question
- From: Paul Davis <pbd op net>
- To: Daniel Elstner <daniel elstner gmx net>
- Cc: Jussi Pakkanen <jpakkane yahoo com>, gtkmm-list gnome org
- Subject: Re: [gtkmm] A small doc question
- Date: Wed, 16 Oct 2002 18:11:39 -0400
>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]