[Gdal-dev] GvOptionMenu callback

Mario Beauchamp starged at gmail.com
Fri Feb 23 21:05:57 EST 2007


Hi Shawn,

On 2/23/07, Gong, Shawn <Shawn.Gong at drdc-rddc.gc.ca> wrote:
>
> I use gvutils.GvOptionMenu instead of entry box.
>
> Problem is that I don't know how to trigger the callback when a different
> item is selected.
>
>
>         self.alg = gvutils.GvOptionMenu(ALG_LIST)
>
>         self.alg.set_history(0)
>
>         self.alg.connect('changed',self.algorithm_changed_cb)
>

This really belongs to openev-discuss (openev-discuss at lists.sourceforge.net)
so I replied there as well.

You don't need to connect to the GvOptionMenu, you set the callback in
the constructor like this:

self.alg = gvutils.GvOptionMenu(ALG_LIST, self.algorithm_changed_cb)

cheers
-- 
Mario B.



More information about the Gdal-dev mailing list