Re: [gtk-list] GtkCombo



Leonardo Zide wrote:

>
>   I'd like to know when the user has selected an item from a GtkCombo,
> currently I'm using the unmap event of the popwin but it's not exactly
> what I want. How can I know if the user really selected a new item or
> clicked outside the list (both actions give an unmap event) ?


  I think the standard is to capture the "changed" event from the entry part
of the combo...

GtkWidget *mycombo,*myentry;
mycombo=gtk_combo_new();

<snip.  fill combo, etc.>

  /* hook your callback to the combo's text entry sub-widget. */
myentry=GTK_COMBO(mycombo)->entry;
gtk_signal_connect(GTK_OBJECT(myentry),"changed",
                                   GTK_SIGNAL_FUNC(mycallback),NULL);

  jca




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