TreeView Multiple Selection



Hello,

So since the TreeView seems to be such a popular topic on this list, I decided I'd throw some of my own TreeView questions in.

I want to make the items in the list "click on" and "click off" as opposed to "click on-but-also-remove-selection-from-the-rest-of-the-items." What I want is the selection to act as though it were in SELECTION_MULTIPLE mode with the control key held down during all the clicks. Of course without the control key having to be held down all the time.

In Gtk::SelectionMode, we seem to have None, Single, Browse, Multiple, and Extended. None of these seem to do what I'm looking for, and I can't quite tell what the difference is between Multiple and Extended.

Then there's TreeSelection::on_select_function(). It seems to be in the right direction, but I don't see how this function can help me. Maybe I'm misunderstanding it. To use this function, I would want to return true on the row that was clicked, and false on all other rows. The problem is that the select function seems to get called for _every_ row that's affected by a user interaction (click, keypress, etc), so I have no way of knowing which row was the one clicked (because that's the _only_ row that I want to change if I were to go this route).

So I'm kind of stumped here. I feel like there's probably something easy that I've missed. Any help is appreciated.

Alan.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]