tkinter.scrollbar

Python tkinter use canvas to create dynamically window with scroll bar

烂漫一生 提交于 2020-01-30 06:49:05
问题 My objective is to solve the problem of the grid exceeding the window(shown as figure.1) enter image description here My program function is creating a grid that number of columns defined by user. I tried using canvas to solve this problem, but it still doesn't work successfully. It doesn't show the full grid in the canvas.(shown as figure.2) enter image description here Below is my code, could you please help solve the problems or give me some advice. Thanks a lot. Code: import tkinter as tk

Adding a scrollbar to a group of widgets in Tkinter

余生颓废 提交于 2019-11-25 21:42:12
问题 I am using Python to parse entries from a log file, and display the entry contents using Tkinter and so far it\'s been excellent. The output is a grid of label widgets, but sometimes there are more rows than can be displayed on the screen. I\'d like to add a scrollbar, which looks like it should be very easy, but I can\'t figure it out. The documentation implies that only the List, Textbox, Canvas and Entry widgets support the scrollbar interface. None of these appear to be suitable for