Whenever I'm filling the box with text, horizontal scrollbar work fine until the text is seen on the screen.
However if the number of lines is greater than can be seen on the screen and I scroll the text down, the horizontal scrollbar becomes inactive up to the point when text is too long to fit one line again
Here's my really basic code:
from Tkinter import *
import Tkinter,tkFileDialog, tkFont
w = Label(root, text="Hello, world!")
w.pack()
textfr=Frame(root)
t=Text(textfr, width=100, height=10,font=("Arial",12),wrap=NONE)
t.insert('1.0', 'here is my text to insert')
Yscroll=Scrollbar(textfr, orient=VERTICAL)
Xscroll=Scrollbar(textfr, orient=HORIZONTAL)
t.configure(yscrollcommand=Yscroll.set)
t.configure(xscrollcommand=Xscroll.set)
Yscroll.config(command=t.yview)
Xscroll.config(command=t.xview)
#pack everything
Yscroll.pack(side=RIGHT,fill=Y)
Xscroll.pack(side=BOTTOM,fill=X)
t.pack(side=LEFT, fill=BOTH, expand=TRUE)
textfr.pack(side=TOP, fill=BOTH, expand=TRUE)
root.mainloop()
Alas I couldn't find/google proper solution, even though the problem is really basic
Any ideas?
This is just a quick example using buttons. Change the numbers in the range() statements of the for loops to get an idea for it, you should be able to adapt this code then your suit yours, hope this helps.