0

For set data to the treeview, I'm using the set_cell_data_func at some columns.
source like this:

myRenderer = gtk.CellRendererText()
column = gtk.TreeViewColumn("col1", myRenderer, text=columnId)
column.set_cell_data_func(myRenderer, func1)

def func1(self, column, cell, model, iter):
    cell_name = model.get_value(iter, 0)
    if cell_name in category_dict:
        cell.set_property('text', category_dict[cell_name])
    else:
        cell.set_property('text', "")
    return

Therefore, my tree_view_model doesn't have a data that is displayed in the treeview.
How to retrieve the data that has been set in set_cell_data_func,
Do you have any?

gpoo
  • 8,408
  • 3
  • 38
  • 53
  • I don't understand the question. What are you trying to retrieve? – lxop Jun 06 '12 at 04:17
  • Also, func1 shouldn't have a self argument, since it is a static function, not a method. – lxop Jun 06 '12 at 04:18
  • thanx lxop for responce. you are right, i'm using func1 inside of class... func1 is doing some calculate, display results. I'd like to get value of this results, from cellrendere's property "text". thanx! – nabepyon Jun 06 '12 at 13:55

1 Answers1

1

Use cell.get_property ("text")

lxop
  • 7,596
  • 3
  • 27
  • 42