[pygtk] Line wrapping in TreeView while editing

saeed saeed.gnu at gmail.com
Fri Sep 25 00:40:05 WST 2009


There is two properties of CellRendererText: "wrap-mode" and
"wrap-width", but it doesn't work while editing.
for example:
_______________________________________________
cell = gtk.CellRendererText()
cell.set_property('wrap-mode', gtk.WRAP_WORD)
cell.set_property('editable', True)
col = gtk.TreeViewColumn('Description', cell, text=0)
col.set_resizable(True)
treeview.append_column(col)
treeview.connect('expose-event', treeviewExpose, cell, col)

def treeviewExpose(widget, event, cell, col):
   cell.set_property('wrap-width', col.get_width())
____________________________________


More information about the pygtk mailing list