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



:-)

> 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.

I'm afraid I'm dumb cause I still don't understand :-(
What do you mean: >>the "columns" (markup, foreground, background)<< ?
Let's take an example:

http://stackoverflow.com/questions/1447187/embed-a-spreadsheet-table-in-a-pygtk-application

Let's imagine that we have the lines:

	self.liststore.append(['Open', gtk.STOCK_OPEN, '<b>O</b>pen a File', True])
        self.liststore.append(['New', gtk.STOCK_NEW, '<b>N</b>ew File',
True])
        self.liststore.append(['Print', gtk.STOCK_PRINT, '<b>P</b>rint
File', False])

May I ask for corresponding, modified set_property() ?

Best regards,
Marek


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