Entry scroll doesn't work

V

VK

Hi!
Can entry widget be scrolled?
VK

TypeError: xview() takes exactly 2 arguments (4 given)

Code:



from Tkinter import *
class ScrollEntry:
def __init__(self):
self.root = Tk()
self.scrollbar = Scrollbar(self.root,orient=HORIZONTAL,)
self.entry = Entry(self.root,xscrollcommand=self.scrollbar.set)
self.entry.focus()
self.entry.pack(side=TOP,fill=X)
self.scrollbar.pack(fill=X)
self.scrollbar.config(command=self.entry.xview)
self.entry.config()


a=ScrollEntry()
a.root.mainloop()
 
V

VK

VK said:
Hi!
Can entry widget be scrolled?
VK

TypeError: xview() takes exactly 2 arguments (4 given)

Code:



from Tkinter import *
class ScrollEntry:
def __init__(self):
self.root = Tk()
self.scrollbar = Scrollbar(self.root,orient=HORIZONTAL,)
self.entry = Entry(self.root,xscrollcommand=self.scrollbar.set)
self.entry.focus()
self.entry.pack(side=TOP,fill=X)
self.scrollbar.pack(fill=X)
self.scrollbar.config(command=self.entry.xview)
self.entry.config()


a=ScrollEntry()
a.root.mainloop()

Already found: :)

http://infohost.nmt.edu/tcc/help/pubs/tkinter/entry-scrolling.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,240
Messages
2,571,211
Members
47,845
Latest member
vojosay

Latest Threads

Top