[Gdal-dev] GvOptionMenu callback

Gong, Shawn Shawn.Gong at drdc-rddc.gc.ca
Fri Feb 23 15:29:17 EST 2007


Hi list,

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.

I get message:
Gtk-WARNING **: gtk_signal_connect_full(): could not find signal
"changed" in the `GtkOptionMenu' class ancestry


Thanks,
Shawn Gong


The callback is in the second last line.
---------------------------------
    def create_gui(self):

        self.set_policy(gtk.FALSE, gtk.TRUE, gtk.TRUE)
        
        #put all the frames in a dict so
        #we can show and hide them

        self.frame_dict = {}

        # main box

        gui_box = gtk.GtkVBox(spacing=20, homogeneous=gtk.FALSE)
        gui_box.set_border_width(10)
        self.add(gui_box)

        # algorithm option menu
       
        frame = gtk.GtkFrame(Algorithm')
        self.frame_dict['algorithm'] = frame
        gui_box.add(frame,expand=FALSE)
        vbox = gtk.GtkVBox(spacing=15)
        vbox.set_border_width(10)
        frame.add(vbox)

        box = gtk.GtkHBox(spacing=5)
        vbox.add(box,expand=FALSE)
        self.alg = gvutils.GvOptionMenu(ALG_LIST)
        self.alg.set_history(0)
        self.alg.connect('changed',self.algorithm_changed_cb)
        box.add(self.alg)
        ... ...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070223/1a9df7bf/attachment.html


More information about the Gdal-dev mailing list