[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Selected widget visibility on clists and trees [gtk 1.2]
- From: "David M. Cook" <dave davidcook org>
- To: gtk_list gtk gtk <gtk-app-devel-list gnome org>
- Subject: Re: Selected widget visibility on clists and trees [gtk 1.2]
- Date: Thu, 17 Jul 2003 07:02:44 -0700
On Wed, Jul 16, 2003 at 02:41:19PM -0700, Harring Figueiredo wrote:
> How can I find out that a treeview row (useng listStore) has been selected
>by
> the user ?
>
> I have the follwoing. Is there a different/better way ?
>
> ... callback to a "cahnged" signal on the treeview selection...
>
> treeview = gtk_tree_selection_get_tree_view (selection);
> if (gtk_tree_selection_get_selected (selection, &model, &iter))
> {
> g_print("There some selection ...\n");
> }
This will tell you if there's a selection, but what you really want to do is
connect a handler to the "changed" signal of the selection object. See the
bottom of
http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeSelection.html
for the prototype of the callback. Then in your callback you'll use
get_selected to get the selected row itself.
Dave Cook
> Thanks for the help.
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]