Python Forum
[Tkinter] Forms' expansion
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Forms' expansion
#5

  1. Q: Why did you give name for Tkinter in the beginning? In my code it worked better
    A: see the following thread https://python-forum.io/Thread-Namespace...th-imports

  2. Q: What did you use class for?
    A: Classes are a much better way of organising GUI code and easier to access the instance attributes.

  3. Q: What does "__init__" function do and why is it called so?
    A: When an instance of a class is created the __init__ method is automatically called to initialise attributes, see forum tutorial https://python-forum.io/Thread-Classes-Class-Basics

  4. Q: Purpose of the condition in the end of code and how does it work?
    A: if __name__ == "__main__" is true if you are executing the module directly. This is used to put code that you want to run only when executing this module directly but not to execute if you are importing this module into another.
Reply


Messages In This Thread
Forms' expansion - by Gupi - May-22-2019, 04:01 PM
RE: Forms' expansion - by heiner55 - May-22-2019, 05:17 PM
RE: Forms' expansion - by Yoriz - May-22-2019, 06:59 PM
RE: Forms' expansion - by Gupi - May-23-2019, 04:40 AM
RE: Forms' expansion - by Yoriz - May-23-2019, 05:27 AM
RE: Forms' expansion - by Gupi - May-23-2019, 05:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Question about data grid for forms - desktop program Everest 5 3,641 Apr-18-2019, 11:04 AM
Last Post: buran

Forum Jump:

User Panel Messages

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