Re: GtkCombo



In message <200104192248 SAA07141 renoir op net>, Paul Davis writes:

>In message <200104192202 SAA34526 ww2 tqstats com>you write:

>>Do anyone know what signal to use to handle the user clicking on the down
  ^^ Oops, I meant to say Does.
>>arrow in the GtkCombo widget?

>i believe that you want to use the "map" signal, and return FALSE from
>your handler. its been a while since i did this, and i can't find the
>code where i did it, so i'm not sure which widget you need to attach
>to, but picking one of the lesser known signals like this is the way
>to do this. i often do this for menus, for example: when map is
>signalled, i redefine the content of the menu, return FALSE and voila:
>a totally dynamic menu.

Good advice!

gtk_signal_connect(GTK_OBJECT(combo->popwin), "map", (GtkSignalFunc) foo, NULL);

worked.

Of course, gtkcombo.h has the following to say:

/* you should access only the entry and list fields directly */

It would be nice to have a higher level API for this kind of thing.

John

-- 
John GOTTS <jgotts linuxsavvy com>  http://linuxsavvy.com/staff/jgotts




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