[pygtk] GTK + Glade + Python combo box

Bob Marley tuffgongbob at hotmail.com
Mon Jun 11 23:33:45 WST 2007


Hello everyone, I'm sort of a beginner at Python. I've created a GUI in 
Python using Glade
and GTK and I have two questions. I'm having trouble with comboboxes. 
Particularly with entering data into a combo box from Python. I've tried the 
following....

Code: ( text )

   1.
      myCombo = self.wTree.get_widget('comboboxentry')
   2.
      myCombo.append_text('blah blah blah')



to no avail... apparently you have to first do gtk.combo_box_new_text() 
before you can append text. Is this possible when using Glade to construct 
my GUI?

My second question is this.. How do I create a ListBox using Glade or GTK. I 
would like eventually to be able to grab text from a line via mouse click. 
For example, a list of files appear in a text area and the user would be 
able to double click on the file and be able to delete it etc... Any help 
would be greatly appreciated. Thank you.

Michael Carlisle

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



More information about the pygtk mailing list