On Thu, Jan 04, 2007 at 12:06:51AM +0100, David Philippi wrote:
> Hello,
> 
> I'm trying to do simple text formatting on a Gtk.Label but I can't find out 
> how to do this. Could someone point me to documentation about this or show me 
> some example code for simple things like making text bold, changing size and 
> color or similiar...

You need to use pango markup
(http://www.gtk.org/api/2.6/pango/PangoMarkupFormat.html) to do this.
You can basically do this:

Gtk.Label label = new Gtk.Label ();
label.Markup = "<b>BOLD</b>";

or, if your label needs a mnemonic:

label.MarkupWithMnemonic = "<b>_BOLD</b>";

-pete

-- 
Peter Johanson
<[EMAIL PROTECTED]>
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to