Skip to content Skip to sidebar Skip to footer

Use Optionmenu In Python

self.btype2=StringVar() self.cboType = OptionMenu(self.master,self.btype2,'Computer','Science','General') self.cboType.place(x=15, y=20, width=150, height=23) self.cboType.config(s

Solution 1:

Use btype2 as that is your string variable. You do not need the self.btype2=self.cboType. If the three items to select from are what you want to go to the Db then in your Db statement use btype2 where you would put what it is. I.E.

insert into tablename Values(btype2)

Post a Comment for "Use Optionmenu In Python"