[Gtk-sharp-list] TreeView.Selection.Mode = SelectionMode.Multiple

Slug toddglodek at hotmail.com
Sat Apr 25 16:44:19 EDT 2009

So I was looking for a way to get all the selected rows out of a tree view. 
I looked at this page in the monodocs site. 


That looked easy enough.  However when you set the TreeView.Selection.Mode =
SelectionMode.Multiple  the call to GetSelected() doesn't do anything except
write a message into the ApplicationOutput trace.  The following message is
what I get, but no catchable exception is thrown:

Gtk-CRITICAL **: gtk_tree_selection_get_selected: assertion `selection->type

Then I noticed on the monodocs page for the
Gtk.TreeSelection.SelectedForeach Method there is a note that says This
method is useful when the TreeSelection.Mode of this TreeSelection is set to
Selection.Multiple.   Is this the case?  I saw a few blogs mentioning this
exception  when I Googled the exception, but none of them mentioned
SelectedForeach().  Am I just missing something very simple ?

I'll try and post an example later unless somebody beats me to it. 

- Slug

View this message in context: http://www.nabble.com/TreeView.Selection.Mode-%3D-SelectionMode.Multiple-tp23236249p23236249.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20090425/93ba27a9/attachment.html 

More information about the Gtk-sharp-list mailing list