Python Forum
Help me understand this... (Classes and self).
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help me understand this... (Classes and self).
#14
You need to make
tab_one = tk.Frame(nb) # <-- target actual # #
accessible by adding it as a variable of MainFrame
self.tab_one = tk.Frame(nb) # <-- target actual # #
nb.add(self.tab_one, text='Entries')
then you can use
tab1 = TabOne(main_nb.tab_one) #This doesn't work; "main_nb.tab_one" (or whatever) throws error.
Reply


Messages In This Thread
RE: Help me understand this... (Classes and self). - by Yoriz - Mar-31-2019, 10:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to understand classes menator01 7 3,405 Oct-27-2019, 04:26 PM
Last Post: menator01
Question Helping understand classes Miraclefruit 10 6,418 Nov-27-2017, 01:58 PM
Last Post: Windspar
  Using classes? Can I just use classes to structure code? muteboy 5 5,166 Nov-01-2017, 04:20 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020