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 ( ...