[Gtk-sharp-list] Logical error in behavior when Treeview model's Selection.Mode = SelectionMode.Multiple

Christopher David Howie me at chrishowie.com
Thu Aug 19 03:06:59 EDT 2010


On 08/18/2010 04:14 PM, soy wrote:
> There seems to be an off by one bug/error in the way a Treeview behaves when
> its Model's Selection.Mode is set to Multiple.
> 
> When I use the GetSelectedRows() method to get an array of TreePath, then
> iterate over that array, it will never include the last row a user selected. 
> I've been using the CursorChanged signal for my Treeview as the point at
> which I use the GetSelectedRows() method.  I've tried other signals to see
> if the results would be different, but none of them have worked either.  
> 
> Is this really a  bug, or am I going about this the wrong way?  I hope it's
> not a bug..........

IIRC, this event gets called before the selection is actually changed.
What you really want to do is attach a handler to
treeView.Selection.Changed.

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers

If you correspond with me on a regular basis, please read this document:
http://www.chrishowie.com/email-preferences/

PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5

------------------------------------------------------------------------
                    IMPORTANT INFORMATION/DISCLAIMER

This document should be read only by those persons to whom it is
addressed.  If you have received this message it was obviously addressed
to you and therefore you can read it.

Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am "the intended recipient," and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.

This overrides any disclaimer or statement of confidentiality that may
be included on your message.


More information about the Gtk-sharp-list mailing list