Re: radio button size



Boncek, John wrote:
I'm creating a set of radio buttons using gtk_radio_button_new, etc.,
without labels attached to the buttons.  How do you control the size of a
radio button?  (I need smaller buttons.)  I've tried
gtk_widget_set_size_request, but that seems to control the area in which
the button displays, with the button itself being truncated without
changing size.

    Usualy in a GTK+ interface you are working with a relative
size/coordinate system (because you want your application to be
resizable, run on many different desktops and still look relatively
the same everywhere), the size allocated to a button is decided
by the parenting widget using child properties ("packing properties").

setting the "width-request"/"height-request" widget properties
(i.e. using gtk_widget_set_size_request() ) will ensure that the
widget in question will never be smaller than "w/h".

packing properties vary across containers, see for example the
"expand", "fill" and "padding" child properties of the GtkBox
container:

http://developer.gnome.org/doc/API/2.0/gtk/GtkBox.html#GtkBox--expand

Cheers,
                                  -Tristan




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