python 2.7 - Can you change the variable an optionmenu writes to in Tkinter? -


say have following optionmenu:

   self.cart = stringvar(self.frame1)        self.cart.set("")    self.e1 = optionmenu(self.frame1, self.cart, *watercarts)       self.e1.grid(row=1, column=1, stick=e+w) 

as is, save selected option self.cart. there way change that? tried:

    self.e1.config(variable=self.othervar) 

it returns, tclerror: unknown option "-variable".


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -