Re: Signal attach to GtkOptionMenu

On 04/01/01 dLux wrote:
/--- On Wed, Mar 21, 2001 at 07:43:03PM +0100, Paolo Molaro wrote:
| >   I have tried to attach a "clicked" signal handler to a
| > GtkOptionMenu object,  but it  does not seem  to be  called. Enter
| > and
| > Leave signal handlers works fine.
| It's quite possible the clicked signal doesn't get emitted at
| all for the optionmenu widget: it is a button, but works quite
| differently. Maybe the pressed signal is emitted, or you may
| try connecting to the button-press-event...

I  have  got  a problem  with  this:  If  I  attach something  to  the
button-press,  then it  is emitted  when the  popup window  created. I
need to  attach signal to the  event when the selection  is chosen, so
the popup window is closed. Is there any way to do it with glade?

Oh, that's an entirely different problem.

$menu = $optionmenu->get_menu;
$menu->signal_connec('selection-done', \&handler);

Should do what you need, but I haven't tested it.


lupus debian org                                     debian/rules
lupus ximian com                             Monkeys do it better

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]