GtkOptionMenu and settings a MenuItem "by hand"
| From: | Markus Fischer | Date: | Mon, 11 Jul 2005 08:58:59 +0000 |
| Subject: | GtkOptionMenu and settings a MenuItem "by hand" | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-5946@lists.php.net to get a copy of this message | ||
Hi,
(in php-gtk 1.0.1a, windows) I've a GtkOptionMenu to provide a selection to the user. Now I'm saving his preference and what on application start up select one of the GtkMenuItems "by hand" after the GtkOptionMenu has been created.
Currently I do this following:
1. I search for the MenuItem I want to have pre-selected for the user
2. I call it's select() and/or activate() method
During testing I caled both, but the real problem is that the GtkOptionMenu does not reflect the change, i.e. it does not show the MenuItem I selected BUT when I clock on the GtkOptionMenu to choose another one, the given entry IS selected.
But this seems to be incorrect, because then the MenuItem is always drawn selected when I open the GtkOptionMenu.
I think I'm missing something the GtkOptionMenu provides to simply tell it "show me this GtkMenuItem selected".
Thanks for any help,
- Markus