I need to send one variable from one class to other.
My code:
The class I get variable
class Application(tk.Tk):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
#TOOLBAR MENU
toolbar = tk.Frame(self, bd = 1, relief = tk.RAISED)
self.choicebutton = tk.Button(toolbar, command=self.choice)
#TOOLBAR MENU
toolbar = tk.Frame(self, bd = 1, relief = tk.RAISED)
The class I import variable :
class Frame1(tk.Frame):
def __init__(self, parent, *args, **kwargs):
super().__init__(parent, *args, **kwargs)
a.Application.choicebutton.config(state="disabled")
I got error:
AttributeError: type object 'Application' has no attribute 'choicebutton'
Applicationto accesschoicebutton.