Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14126

Vertical Scrollbar disappears when window width passes threshold

$
0
0

This code creates a window with a text box and a vertical scroll bar. If the window's width is changed by dragging the edge of the window, and the width decreases below some threshold (~660 pixels) the vertical scrollbar disappears.

What is causing the vertical scroll bar to be pushed out of the window when this threshold is reached? I've not defined widths for any widgets here. I would expect the text box to just get smaller and smaller as the window's width is reduced.

import tkinterwindow = tkinter.Tk()text_box = tkinter.Text(master = window)text_box.pack(side = "left", fill = "both", expand = True)vertical_scrollbar = tkinter.Scrollbar(master = window, command = text_box.yview)vertical_scrollbar.pack(side = "right", fill = "y")window.mainloop()

Viewing all articles
Browse latest Browse all 14126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>