Skip to content Skip to sidebar Skip to footer

Horizontal Scrollbar On Text Widget Not Working

I have a small program that loads one or more iterations of a long string into a text field. I have set up a horizontal scrollbar to let me move across very long strings of text. I

Solution 1:

You haven't specified a value for the wrap option of the text widget, so by default the text in the widget will wrap at the edge of the window. If text is wrapped, there is never anything beyond the right margin, so scrollbars are useless.

If you want the scrollbars to work, turn wrapping off by setting the wrap option of the widget to the string "none".

text=tk.Text(win, height=1, font='Helvetica 12', wrap="none")

Post a Comment for "Horizontal Scrollbar On Text Widget Not Working"