Newbie Tkinter problem...

B

Baltor

I am trying to attach a scollbar to a text field. This is the code
I am using:



# Scroll Bar and Text Box

self.scrollbar = Scrollbar(master, orient=VERTICAL)

self.scrollbar.pack(side=RIGHT, fill=Y)

self.text = Text(master, height=5, width=20, state=DISABLED,
yscrollcommand=self.scrollbar.set)

self.text.grid(row=2, column=1, rowspan=2)

self.scrollbar.config(command=self.text.yview)



When I run the program, the program freezes and I have to Ctrl-Alt-
Delete put of it. What's wrong?

Thanks in advance.
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top