RE: radio button size



So much for resizability.  What about color control of the button?  I have
found by heavy experimentation that the color of the active dot can be set
by gtk_widget_modify_text and the color of the background behind the dot
by gtk_widget_modify_base.  Is there any way to control the color of the
circular edge around it?  Or is it always black, as I have seen?

-----Original Message-----
From: Christopher Anderson [mailto:sidewinder asu gmail com] 
Sent: Wednesday, June 15, 2005 2:44 PM
To: Boncek, John
Cc: Tristan Van Berkom; gtk-app-devel-list gnome org
Subject: Re: radio button size

I don't think you can change the size of the actual button, as this is
determined by the system you are running on. You could perhaps create
your own radio button widget and write custom drawing code for it.

Chris Anderson

On 6/15/05, Boncek, John <jboncek hunter com> wrote:
Yes, I can change the packing properties, but I need smaller buttons.
I've tried various combinations of the things you suggested but the
actual
button, the round area which contains the dot to show whether it's
selected, doesn't change size.  What controls the size of the actual
round
button?  Is that immutable?  I even tried using gtk_widget_modify_font
with various font sizes on the buttons in case the font controls the
size,
but again, no change.

-----Original Message-----
From: gtk-app-devel-list-bounces gnome org
[mailto:gtk-app-devel-list-bounces gnome org] On Behalf Of Tristan Van
Berkom
Sent: Wednesday, June 15, 2005 1:45 PM
To: Boncek, John
Cc: gtk-app-devel-list gnome org
Subject: 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

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





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