Python Forum
Thread Rating:
  • 5 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Requests
#58
I'd like to see a tutorial on how to apply OOP and classes to managing GUI applications using tkinter.

Classes and objects make sense to me in terms of the standard examples (a Car class, etc.) Where I lose the connection is trying to make a frame in a tkinter window a class, which several tutorials suggest, and then getting user inputs in that frame and and passing that data to another frame in the same window where it will be used to calculate or retrieve information that will then be displayed in yet another frame.

Simple things like how do you specify the location of a frame when it's a class (I'm using grid placement for all my tkinter stuff) and how do you create it? How do you actually call the various methods that you might create that read the contents or user input and then send it on to the next class for use? I'm not planning on having 2 copies of any specific frame class in the same window but I may have copies of the same frame class in multiple top level windows.

Classes were what I was told to use because in many cases the code to produce the contents of a single frame is the same across several windows.

I'm coming from Java on Android and there a single window is an activity and all the UI pieces (buttons, user inputs, outpur fields, etc.) are available to any code within that window. They all can operate independently.
Reply


Messages In This Thread
Tutorial Requests - by metulburr - Nov-04-2016, 06:35 PM
RE: Tutorial Requests - by Larz60+ - Nov-05-2016, 05:45 AM
RE: Tutorial Requests - by wavic - Nov-08-2016, 06:22 PM
RE: Tutorial Requests - by nilamo - Nov-08-2016, 06:23 PM
RE: Tutorial Requests - by PaulMorrey - Dec-08-2016, 07:32 PM
RE: Tutorial Requests - by phread - Oct-25-2017, 09:18 PM
RE: Tutorial Requests - by nilamo - Dec-08-2016, 07:37 PM
RE: Tutorial Requests - by PaulMorrey - Dec-08-2016, 08:38 PM
RE: Tutorial Requests - by metulburr - Dec-08-2016, 10:13 PM
RE: Tutorial Requests - by Larz60+ - Dec-08-2016, 10:53 PM
RE: Tutorial Requests - by Kebap - Apr-07-2017, 02:15 PM
RE: Tutorial Requests - by nilamo - Apr-07-2017, 02:20 PM
RE: Tutorial Requests - by sparkz_alot - Apr-07-2017, 03:17 PM
RE: Tutorial Requests - by zivoni - Apr-07-2017, 06:55 PM
RE: Tutorial Requests - by nilamo - Apr-07-2017, 07:08 PM
RE: Tutorial Requests - by nilamo - May-09-2017, 06:05 PM
RE: Tutorial Requests - by snippsat - May-09-2017, 08:48 PM
RE: Tutorial Requests - by wavic - May-26-2017, 04:24 PM
RE: Tutorial Requests - by sparkz_alot - Jul-08-2017, 01:37 PM
RE: Tutorial Requests - by ichabod801 - Jul-08-2017, 02:19 PM
RE: Tutorial Requests - by sparkz_alot - Jul-08-2017, 11:25 PM
RE: Tutorial Requests - by nilamo - Jul-10-2017, 06:33 PM
RE: Tutorial Requests - by Larz60+ - Jul-10-2017, 09:19 PM
RE: Tutorial Requests - by j.crater - Jul-12-2017, 07:16 AM
RE: Tutorial Requests - by nilamo - Jul-10-2017, 09:52 PM
RE: Tutorial Requests - by Larz60+ - Jul-11-2017, 12:22 AM
RE: Tutorial Requests - by monstertut - Jul-11-2017, 10:46 AM
RE: Tutorial Requests - by metulburr - Oct-23-2017, 11:53 PM
RE: Tutorial Requests - by snippsat - Oct-25-2017, 08:47 PM
RE: Tutorial Requests - by sparkz_alot - Oct-26-2017, 01:12 PM
RE: Tutorial Requests - by BlackHeart - Nov-10-2017, 06:45 AM
RE: Tutorial Requests - by nilamo - Nov-12-2017, 06:56 PM
RE: Tutorial Requests - by BlackHeart - Nov-13-2017, 09:14 PM
RE: Tutorial Requests - by sparkz_alot - Dec-20-2017, 03:36 PM
RE: Tutorial Requests - by NarutoKD - Jun-07-2018, 12:09 PM
RE: Tutorial Requests - by Larz60+ - Jun-07-2018, 12:18 PM
RE: Tutorial Requests - by NarutoKD - Jun-07-2018, 12:32 PM
RE: Tutorial Requests - by j.crater - Aug-14-2018, 08:24 PM
RE: Tutorial Requests - by snippsat - Aug-14-2018, 09:01 PM
RE: Tutorial Requests - by j.crater - Aug-14-2018, 09:06 PM
RE: Tutorial Requests - by marienbad - Oct-17-2018, 04:46 PM
RE: Tutorial Requests - by Larz60+ - Oct-17-2018, 07:23 PM
RE: Tutorial Requests - by metulburr - Jan-12-2019, 11:29 PM
RE: Tutorial Requests - by saruque - Apr-23-2019, 05:31 PM
RE: Tutorial Requests - by Maheshsharma - Sep-14-2019, 10:09 AM
RE: Tutorial Requests - by metulburr - Sep-14-2019, 10:21 AM
RE: Tutorial Requests - by Ankit79 - Oct-08-2019, 05:11 AM
RE: Tutorial Requests - by Evil_Patrick - Nov-23-2019, 09:18 AM
RE: Tutorial Requests - by nilamo - Dec-09-2019, 05:29 PM
RE: Tutorial Requests - by robbyq - Jan-17-2020, 11:56 PM
RE: Tutorial Requests - by Larz60+ - Jan-18-2020, 04:24 AM
RE: Tutorial Requests - by t4keheart - Feb-25-2020, 02:58 PM
RE: Tutorial Requests - by Eyssant - Apr-29-2020, 05:32 AM
RE: Tutorial Requests - by pavanbaddi911 - Apr-29-2020, 01:01 PM
RE: Tutorial Requests - by menator01 - May-06-2020, 04:56 PM
RE: Tutorial Requests - by sjkelleyjr - Jun-14-2020, 02:52 PM
RE: Tutorial Requests - by OogieM - Sep-06-2020, 01:46 PM
RE: Tutorial Requests - by Larz60+ - Sep-06-2020, 04:17 PM
RE: Tutorial Requests - by OogieM - Sep-07-2020, 08:37 PM
RE: Tutorial Requests - by singletonamos50 - Dec-13-2020, 04:09 PM
[split] pylogger - by sunilbhatraju - Dec-20-2017, 06:50 AM

Forum Jump:

User Panel Messages

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