Re: TreeView help
- From: Murray Cumming <murrayc murrayc com>
- To: "Amadeus W. M." <amadeus84 cablespeed com>
- Cc: gtkmm-list gnome org
- Subject: Re: TreeView help
- Date: Sun, 13 Nov 2005 14:18:44 +0100
On Sat, 2005-11-12 at 21:09 -0500, Amadeus W. M. wrote:
> This is my first take at a TreeView, and I tried to figure it out on my
> own from the docs, but I must resort once again to the community.
>
> I have a bunch of files which I want to load and display in a TreeView
> using a ListStore. I can do that, and do something to a selected row, ONLY
> in SELECTION_SINGLE mode. In SELECTION_MULTIPLE, I'm trying to pass a
> callback to select_foreach() but it never gets called. Please see
> tree_path_action() below, and the constructor of the main window.
>
>
> In fact, I don't even understand very well how multiple selection works.
> The user does Ctrl+Button1 on each item it wants, then what? When does
> select_foreach() get called?
The slot that you provide to select_foreach() gets called when you call
select_foreach(). It's not a signal.
To respond to changes of the selection, use
Gtk::TreeView::get_selection(), and connect to the signal on that
object.
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch08s04.html#id2500214
> When does gtk (or X?)
know?
> that the user is done
> picking items, and that the action on each item must be triggered?
It can't. If there is an action to take on the items, then you could
have a [Do the Thing] button.
[snip]
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]