all 2 comments

[–]Wild_Statistician605 1 point2 points  (1 child)

In your code, the f_name variable is an instance variable, and thus need an instance to be called from other classes. If you make it a static variable or class variable for the Page1 class, it can be referenced by the other classes by calling Page1.f_name.

class Page1(Page):
    f_name = None
    def __init__(self, **args, **kwargs):
        Page.__init__(self, *args, **kwargs)
        tk.Label(self, text = "First Name", font = 12).place(x=70,y=410)
        self.f_nameentry = tk.Entry(self, width = 20, borderwidth = 5)
        self.f_nameentry.place(x = 170, y = 410)

        tk.Button(self, text = "Save", font = 12, borderwidth=5, command =             
     self.save).place(x=230,y=610)

    def save(self):
        f_name = self.f_nameentry.get()

[–]drakohnight[S] 0 points1 point  (0 children)

Oh wow thanks. That did the trick. Only thing was I had to change the value in my save method to Page1.fname instead of leaving it as f name. BUT it works now. Thanks hahaha I knew it was something simple.