Tutorial by Examples

The connection between the widget and the scrollbar goes both ways. The scrollbar needs to be expanded vertically so that it has the same height as the widget. text = tk.Text(parent) text.pack(side="left") scroll_y = tk.Scrollbar(parent, orient="vertical", command=text.yview...
The principle is essentially the same as for the Text widget, but a Grid layout is used to put the scrollbars around the widget. canvas = tk.Canvas(parent, width=150, height=150) canvas.create_oval(10, 10, 20, 20, fill="red") canvas.create_oval(200, 200, 220, 220, fill="blue")...
When a window contains many widgets, they might not all be visible. However, neither a window (Tk or Toplevel instance) nor a Frame are scrollable. One solution to make the window content scrollable is to put all the widgets in a Frame, and then, embed this Frame in a Canvas using the create_window ...

Page 1 of 1