How do I set gtk.RadioButton font?

G

Google Mike

I've got pyGTK 2-1.99.14 (which comes with my RH9 Linux). Does anyone
know how to set the gtk.RadioButton font? I'm finding the font size
too big for an application I need to build.
 
N

Nikos Kouremenos

Google said:
I've got pyGTK 2-1.99.14 (which comes with my RH9 Linux). Does anyone
know how to set the gtk.RadioButton font? I'm finding the font size
too big for an application I need to build.

Your font is too big only for this? you can change the fonts for
GTK/GNOME by running 'gnome-font-properties'

If you want especially this one to set it smaller and
if you really want to go the 'programmatically' way, then:
http://www.pygtk.org/pygtk2reference/pango-markup-language.html

GLADE XML is better (especially for such stuff)
just enable the USE_MARKUP and then right in the "text"
<small>YOU_TEXT</small>

here is a label of a quick label I clicked in GLADE, and glade wrote this:

<widget class="GtkLabel" id="label33">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;span
background=&quot;lightgreen&quot;&gt;&lt;big&gt;Welcome&lt;/big&gt;&lt;/span&gt;
&lt;small&gt;&lt;span background=&quot;white&quot;&gt;If you change the
settings don't forget to Save &amp;amp; Activate in a
Profile!&lt;/span&gt;&lt;/small&gt;
</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>


for GLADE files and PyGTK take a look here:
http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq22.001.htp

also consider seeing other peopple's sources and you're done :)

Have fun PyGTKing
 
G

Google Mike

Nikos Kouremenos said:
GLADE XML is better (especially for such stuff)
just enable the USE_MARKUP and then right in the "text"
<small>YOU_TEXT</small>

here is a label of a quick label I clicked in GLADE, and glade wrote this:

<widget class="GtkLabel" id="label33">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;span
background=&quot;lightgreen&quot;&gt;&lt;big&gt;Welcome&lt;/big&gt;&lt;/span&gt;
&lt;small&gt;&lt;span background=&quot;white&quot;&gt;If you change the
settings don't forget to Save &amp;amp; Activate in a
Profile!&lt;/span&gt;&lt;/small&gt;
</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>

Unfortunately this has no effect on a radiobutton item.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,205
Messages
2,571,067
Members
47,673
Latest member
MahaliaPal

Latest Threads

Top