I would like to ask what it is the most efficient way of knowing the row number of a cell, when rendering it. Some context:

TreeViewColumn column = new TreeViewColumn();
CellRendererText cell = new CellRendererText();
column.PackStart(cell, false);
column.SetCellDataFunc(cell, new TreeCellDataFunc(RenderCell));

void RenderCell (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) {
      //get row number and use it
}

What is the most efficient way to get the row number, inside the RenderCell function?

ATM i'm using the following to do it:

model.GetPath(iter).Indices[0]

Though, having to create a new path when rendering each cell doesn't look like the best choice.

_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to