Re: pygtk: gtk.CellRendererText().set_property(...) and pango markup (HTML)



On 08/09/2011 23:03, Marek Kozlowski wrote:
> Great. But there is no information howa can I sat it up for
> CellRendererText -- what property and to what value shoul I set:
> `"markup"	Write	Marked up text to render. Default: None'
> 
> Some widgets, for example: Label allow interpreting the text do display
> as a HTML via gtk.Label.set_markup (). I mean: there are HTML tags in
> the _content_.
> I expect some cell content to contain <b>, <i> etc tags. I can't force
> CellRendererText to interpret them :-(

The value of the "markup" property should be set to the
index of the "column" of your model (TreeStore, ListStore
or custom subclass) that holds the actual PangoMarkup.

So if you have a TreeModel(str, str, str), corresponding
to the "columns" (markup, foreground, background), you
would set the "markup" property to 0.

mvg,
Dieter


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]