473,320 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How do I set gtk.RadioButton font?

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.
Jul 18 '05 #1
2 2916
Google Mike wrote:
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...-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;We lcome&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/in...=faq22.001.htp

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

Have fun PyGTKing
Jul 18 '05 #2
Nikos Kouremenos <nk@ebox.gr> wrote in message
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;We lcome&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.
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob Greschke | last post by:
Root.option_add("*Menu.Font", "Veranda 9") as an example, works fine in my program. Root.option_add("*Radiobutton*selectColor", "black") also works fine for regular radiobuttons. What I...
8
by: VK | last post by:
Hi! What I'm missing in following code? Cannot get the values of radiobuttons. Starting only one class (GetVariant), it works. When I put two classes together, it doesn't. Regards, VK from...
2
by: JeffFinnan | last post by:
<form name=form1> Load in Viewer Window: <input name="radiobutton" type="radio" value="1" checked onClick="1"> 1&nbsp;&nbsp;&nbsp; <input type="radio" name="radiobutton" value="2" onClick="2">...
5
by: chrisfarscape | last post by:
I am having a problem getting my visual studio to recognize my option buttons within a table control. When I place <asp:TableCell> <asp:RadioButton id”test1” Text=”Test”...
0
by: member | last post by:
Hi, Good day.i need some help from you guys. I'm using vb.net and sql database to build my file. The purpose of this file is to view news based on deparment. Im using listbox and radiobutton...
12
by: marcwentink | last post by:
Can you change the appearance of a radiobutton or checkbox? I do not mean the apearance changes from checked to not checked or disabled or not disabled, but change the appearance (of all these...
1
by: Renjini Mary | last post by:
hi... i cant seem to get value of set of radio buttons thru javscripting.. i hv set values to the radiobuttons but cannot retrieve them or calculate them in JS although it looks simple. do i need to...
1
by: TechnoAtif | last post by:
This is the third of my problems. here i want the checked data from the radiobuttons to be inserted into database..and then when i revisit the page,i could update the checked data to some other...
11
by: ajaymohank | last post by:
Hello Friends....... in my project i am having a dropdown and based on the values selected from the dropdown, i have to enable 2 radio button. in the on change function of drop down i have written...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.