FAQ Index - Search - Recent Changes - Everything - Add entry

<< Previous Entry | FAQ Entry 7.7 | Next Entry >>

7.7. I set my labels to use_markup in glade-2. Why don't they markup the contents I set?

Marking up the contents of a label is a bit tricky. There are two things to wrap your head around:

 label.set_property("use-markup", False)
 label.set_property("label", "foo")
while label.set_markup("<i>bar</i>") is roughly equivalent to:
 label.set_property("use-markup", True)
 label.set_property("label", "<i>bar</i>")

PyGTK FAQ Wizard | PyGTK Homepage | Feedback to faq at pygtk.org