After some experimentation, I noticed that I can get markup text in
tooltips with the following hack:

def on_notify_use_markup(label, *args):
    label.set_use_markup(True)
tooltips = gtk.Tooltips()
tooltips.force_window()
label = tooltips.tip_label
label.set_use_markup(True)
label.connect('notify::use-markup', on_notify_use_markup)

The code firstly calls "force_window" so that the label widget is
created. After that all changes to the label's "use-markup" property are
reverted back to True.

Is this too bad of a hack? Should I be worried that it does not work in
some cases or that it breaks in future versions of GTK?

-- 
Osmo Salomaa

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to