Re: signals to catch a change in a combobox



On Thu, 15 Aug 2002 13:27:45 +0100 "Richard Warren"
<rew primagraphics co uk> wrote:


I connect to "unmap" on the combo->popwin which gives a signal when the
popup window disappears (which may or may not be because a new item was
selected - you need to check).

This field is supposedly private within the combo structure so is not an
ideal method but it's the best thing I could find.

If your combo->entry is editable directly (rather than just via the item
list like mine is) you'll also need to handle changes to that, possibly
by connecting to a combination of "changed" (although I think you'll get
called for every character typed), "activate" and/or "focus-out-event"
depending on when you want to know.

There really ought to be a more useful signal in the combo box widget
but I don't know what it is if it exists.

thanks, my current solution is:
g_signal_connect_after(G_OBJECT(GTK_COMBO(combo)->list),
"selection-changed", G_CALLBACK(callback), data);
seems to work too :)

thanks,
        Olivier

Attachment: pgpqR1YtKZ3cy.pgp
Description: PGP signature



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