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.