Re: [PHP-GTK] Couple of things (menu + list)
[email protected] (Andrei Zmievski) Thu, 9 Aug 2001 09:44:42 -0500
| Newsgroups | php.gtk |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 09 Aug 2001, David Coulson wrote:
>
> Hi,
> I've got a couple of menus, which works fine - I only need to do
> something which will change the currently selected item without user
> interaction (e.g. they click something else and the selected menu item
> changes).
>
> I've also got a list (as per the 'thing that people click to
> change the menu') - What is the event called when someone clicks on an
> item, and is there a way (other than maybe 'set_data("foo")' within the
> ListItem) to store a more useful value than just the text of the ListItem?
> I'm assuming that there is a nice way to get the currently selected List
> item much like the 'get_active()' fuction for menus.
Use the 'activate' signal on each GtkMenuItem and connect them all to
the same function. The function will receive the GtkMenuItem that was
activated.
-Andrei
As I was going up the stair, I met a man who wasn't there.
He wasn't there again today. I wish, I wish he'd stay away.
-Hughes Mearns