I have recently started learning tkinter. My code exceeds the display limit, and there is no scrollbar to scroll. How do I add one to my code?
Asked
Active
Viewed 24 times
1 Answers
0
Look at these two lines of code.
scrollbar = Scrollbar(root)
scrollbar.pack( side = RIGHT, fill = Y )
These two lines of code create the scrollbar and then packs it into the window. The side tells which side it is supposed to be located and the fill fills the y-axis.
The Laggy Tablet
- 100
- 1
- 11
-
i can see a scrollbar, but it doesnt go down and stays at the top – DatBoi Aug 01 '20 at 11:49
-
@DatBoi Try adding the `exapnd` to it like this - `scrollbar.pack( side = RIGHT, fill = Y , expand = True)` – The Laggy Tablet Aug 01 '20 at 11:53
-
it still doesnt – DatBoi Aug 01 '20 at 11:57