Re: Identifying when user clicks on a row in GtkTreeView
- From: Alexandre Jousset <mid gtmp org>
- To: gtk-perl-list gnome org
- Subject: Re: Identifying when user clicks on a row in GtkTreeView
- Date: Sat, 09 Oct 2004 12:42:51 +0200
Hello,
David Whitmarsh wrote:
I'm a relative newcomer to this so please forgive me if this is an
obvious question but I've done a little research and tinkered with Glade
and it isn't obvious to me.
I have a window with a GtkTreeView and some text boxes. I would like to
populate the text boxes from the ListModel behind the GtkTreeView,
updating the boxes whenever the user selects another row. My first
problem is that I can't find a signal that's fired whenever the user
clicks on the GtkTreeView - double clicks, yes, that's activate_row. Is
there such a signal, or another way of accomplishing my objective?
Yes. You can get the selection with $tree_view->get_selection and then
connect the signal 'changed' of the selection. In the callback you can
get the selection and know the row in question.
Regards,
--
\^/
-/ O \----------------------------------------
| |/ \| Alexandre (Midnite) Jousset |
-|___|----------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]