Python Forum
[Tkinter] I don't think I understand the basics of tkinter!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] I don't think I understand the basics of tkinter!
#2
I don't understand tkinter much either

  1. you can call it whatever you wan't it just a variable name that stores an instance of tk.Tk().
  2. root in line 2 is a pointer to the instance of tk.Tk() created in line 1.
  3. again a variable with a pointer to the created label. you can call it whatever you like just ideally make it something sensible to what the object its pointing at is.
  4. when you use root its calling methods of the tk.Tk() instance, label is calling methods on a instance of tk.Label.
  5. yes its an instance of tk.Tk() and its calling its mainloop() which starts the event loop.
  6. you only have to pass root or label to functions that need to use the methods of those instance or use them as a parent to another gui widget etc.
  7. i think you only ever create one instance of tk.Tk(), create as many label as you like and store pointers to them in any variable, list, dictionary etc you like.
  8. just pass the pointer to the label to the function and then call the methods on it.
  9. i would say just modify it.
  10. don't know for sure as i don't do tkinter but id image the first would show if you delete the one you put over the top.
  11. i don't understand what your asking on this one sorry.
Reply


Messages In This Thread
RE: I don't think I understand the basics of tkinter! - by Yoriz - Apr-06-2019, 09:56 PM

Forum Jump:

User Panel Messages

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