[pygtk] Bold-Face line in a TreeView with glib2.10
Brian
dol-sen at telus.net
Sun May 28 14:05:45 WST 2006
On Sat, 2006-27-05 at 18:02 +0200, Nemesis wrote:
> On Sat, 27 May 2006 09:01:04 -0700
> Brian <dol-sen at telus.net> wrote:
>
> [problems with weight-set]
>
> > It's working for my app just fine. Currently at glib-2.10.2
> [...]
>
> > def cell_data_func(self, column, renderer, model, iter, data):
> > """function to render the package name according
> > to whether it is in the world file or not"""
> > #full_name = model.get_value(iter, 0)
> > color = model.get_value(iter, 5)
> > if model.get_value(iter, 4):
> > renderer.set_property("weight", pango.WEIGHT_BOLD)
> > else:
> > renderer.set_property("weight", pango.WEIGHT_NORMAL)
>
> But you aren't using 'weight-set', you are setting the weight property
> each time to WEIGHT_BOLD or WEIGHT_NORMAL.
>
Sorry, I wasn't fully awake yet this morning :) I just grabbed the
chunk of code we have been using.
--
Brian <dol-sen at telus.net>
More information about the pygtk
mailing list