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 (

Get Tkinter GUI Application Development Blueprints - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.