This is a more precise question, the above was after trying different methods,
and it got a little confusing.

Why in the below does using in line 12:self.objectsvars =
'menuitemhere','menuitemhere','menuitemhere','menuitemhere', not work,
but placing 'menuitemhere','menuitemhere','menuitemhere','menuitemhere'
in line 17 directly work?


        def obOpMenu(self):
                print 'Dummy' #This is my tony robins help
                import time
                self.oblist = self.canvas.find_withtag('object')
                print self.oblist
                self.list = []
                for item in self.oblist:
                        self.itemname = self.canvas.gettags(item)
                        if self.itemname[1] != 'default':
                                self.list.append(self.itemname[1])
                print self.list
                self.objectsvars = 
'menuitemhere','menuitemhere','menuitemhere','menuitemhere'
                print type(self.objectsvars[0])
                self.var = StringVar(self.root)
                self.var.set(self.objectsvars[0])

                self.optionmenu = 
OptionMenu(self.frame,self.var,self.objectsvars)
                self.optionmenu.grid(row = 1,column = 2)


Hope that's clearer:)
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to