Tkinter Python printing user input

You need to set self.result inside apply():

def apply(self):
    first = self.e1.get()
    second = self.e2.get()
    third = self.e3.get()
    fourth =  self.e4.get()
    self.result = (first, second, third, fourth)

Then you can get the result using d.result:

d = MyDialog(root)
print(d.result)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top