[Gtk-sharp-list] Treeview, delete the selected row (can't get it done :( )

countcb count.cb at gmx.net
Fri Jun 27 15:31:53 EDT 2008


Ah. sorry. My mistake.

The parameter to the remove method is passed via the ref keyword. 
That means the Remove method wants to change this iter (it will set the iter
to the next valid row after it deleted the row).

But we just passed a method which will return a iter. But the remove method
can't assign anything to this reutn value because it not held in a variable.

So the correct way of doing it would be:

TreeIter iter = subModel.ConvertIterToChildIter(iterSelected);
listStore.Remove(ref iter);
-- 
View this message in context: http://www.nabble.com/Treeview%2C-delete-the-selected-row-%28can%27t-get-it-done-%3A%28-%29-tp18144085p18162302.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.



More information about the Gtk-sharp-list mailing list