I am having an issue getting this code to parse in tkinter. Two issues happen. I can't get the everb5 variable to pass into the generate function.
class App(Tk):
def __init__(self):
Tk.__init__(self)
self.everb5 = Entry(self).grid(row = 19, column = 2)
self.btn = Button(self, text = "Generate", command = self.generate).grid(row = 25, column = 3, columnspan = 3)
def generate(self):
self.everb5.config(text= "Hello")
Must I also pass the variable to the generate function like so...
def generate(self,everb5)
I also have about 23 variables that have to work in the generate function from the init function. Next steps? Variable containing an array of all variables? I am making a mad libs game and need to pass the answers from Tk() Entry() function to generate() and then i planned on using the .format function to replace the "blank spaces" used in mad libs with the answers provided from the user. I have the button working now, I just need to know how to pass the variables between functions.