[Tutor] Stumbled onto the answer!

John CORRY john.corry at ntlworld.com
Sat May 6 15:28:44 CEST 2006


Hi,
 
I have managed to "fix" my two combo box problem.  I have used the
following code:-
 
self.wTree = gtk.glade.XML ("phonelog.glade", "window1")
        dic={"on_window1_destroy" : self.quit, }
        self.wTree.signal_autoconnect (dic)
        
        combo1 = self.wTree.get_widget("comboboxentry2")
        
        
        combo1.append_text("Open")
        combo1.append_text("Closed")
        combo1.set_active(0)
        
        
        combo1.connect("changed", self.callback2, combo1)
        combo2 = self.wTree.get_widget("comboboxentry1")
        combo2.connect("changed", self.callback3, "comboboxentry1")
        store = gtk.ListStore(gobject.TYPE_STRING)
        store.append (["Mon"])
        store.append (["Tue"])
        store.append (["Wed"])
        store.append (["Thu"])
        store.append (["Fri"])
        store.append (["Sat"])
        store.append (["Sun"])
               
        combo2.set_model(store)
        combo2.set_text_column(0)
        combo2.set_active(0)
 
It works but I am not sure why.  
 
Regards,
 
A Very Happy John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060506/c454be7a/attachment-0001.htm 


More information about the Tutor mailing list