O'Reilly logo

Tkinter GUI Application Development Blueprints - Second Edition by Bhaskar Chaudhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Putting up the skeleton structure

To start, we build a class PianoTutor (7.01/view.py), the __init__ method of which is defined as follows:

class PianoTutor:    def __init__(self, root):    self.root = root    self.root.title('Piano Tutor')    self.build_mode_selector_frame()    self.build_score_sheet_frame()    self.build_controls_frame()    self.build_keyboard_frame()    self.build_chords_frame()    self.build_progressions_frame()    self.build_scales_frame()

In the preceding code, we are simply defining method calls to build multiple Frame widgets of predefined heights.  We won't elaborate much upon the preceding code as we wrote similar code in all of the previous chapters. 

Let's look at one example of frame creation. All other frames follow a similar pattern ( ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required