def __init__(self, root, canvas): self.root = root self.canvas = canvas frame = tk.Frame(root) pane = tk.PanedWindow(frame) pane.pack(fill=tk.BOTH, expand=1) self.yaw_scale = self.add_scale(pane, 'Yaw', self.yaw_callback) self.pitch_scale = self.add_scale(pane, 'Pitch', self.pitch_callback) self.roll_scale = self.add_scale(pane, 'Roll', self.roll_callback) tk.Button(pane, text='Reset', command=self.reset).pack() pane.pack() frame.pack() self.reset() self.active_axis = 0
def _add_pane(self): pane = tk.PanedWindow(self.frame, bg=BACKGROUND_COLOR) pane.pack(fill=tk.BOTH, expand=1) return pane