On Sat, Feb 22, 2003 at 11:20:11AM +0530, Haran Shivanan wrote:
> How do I call g_object_set() from pygtk?
> It doesn't seem to be in gtk, or gobject module.
>
> I need to set the weight property of a GtkCellRendererText object.
> To do so , I guess I need to do g_object_set(renderer,"weight",2)
> or something like that.
> Is this correct?
renderer.set_property("weight", 2)
You can also take the weight from a TreeModel by specifying a column number
for the weight, e.g.:
cell = gtk.CellRendererText()
column = gtk.TreeViewColumn(colname, cell, text=5, weight=6)
treeview.append_column(column)
The cell will have it's weight property set from the value of column 6 of
the model.
Dave Cook
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/