[Glade-users] Adding values to combo box in pygtk



I dragged and drop the combobox from glade and now in python code i am
trying to add values to glade.
I don't know how to do that if anyone has any idea please reply.

   I tried with this


   1. data = ["a","b"]
   2.  self.box=self.tree.get_widget("combobox1")
   3.     store=gtk.ListStore(str)
   4.     store.append(["Choose a name"])
   5.     for d in data:
   6.         store.append([d])
   7.     self.box.set_model(store)



I am new to glade and python i got the above code from one site but it didn'
t worked also don't know GTK part in this program doing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20111014/486ec977/attachment.html 




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