Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-10-2008, 03:34 PM   #1
_ AsiF
Registered: Nov 2006
Location: Malaysia
Posts: 47

Rep: Reputation: 15
Unhappy Gtk->label()


I'm having some problem to change the font size of Gtk Label,,, i'm doing it in Glade and there is no option for Size change of a label text.

I tried some coding,,, but nothin happened !

Can u guys just show me some way ? and also i'm new to this GNOME programming.. but i know C already.

Old 05-12-2008, 07:43 PM   #2
Registered: Jul 2004
Distribution: Fedora
Posts: 241

Rep: Reputation: 31
What language are you using?

The default style is determined by the Theme the user has selected. However, the GtkLabel widget has functions to apply Pango markup directly which you CAN do in glade. First, you have to change the 'Use Markup' property to 'TRUE' and then you can put markup right into the label's text property. For example, you could do '<span size="larger">This is a label</span>' or '<span font="Monospace 10.5">This is a label</span>'.

To see a list of available markup, refer to the Pango manual:

In addition to doing this in Glade, you can do it in code as well using gtk_label_set_use_markup() and gtk_label_set_markup().


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
A good simple text display widget in GTK (not Label) vharishankar Programming 3 05-18-2006 06:44 AM
Freerock uninstall stole GTK looking for up-to-date pango, atk, gtk, glib and xft tgz Oholiab Slackware 8 09-18-2005 12:57 PM
GTK source install doesn't give gtk-config Feebles Linux - Software 4 06-15-2005 01:51 PM
cant find gtk-config file or gtk-devel to install happychappy Linux - Software 2 02-16-2005 01:46 AM
compiling gaim/ gtk error (two versions of gtk) webazoid Linux - Software 0 07-06-2004 07:05 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration