SunQuest
           Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old August 30th, 2003, 01:21 PM
Baltor's Avatar
Baltor Baltor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 67 Baltor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m
Reputation Power: 5
Scrollbar problem...

I am trying to attach a scollbar to a text field. This is the code I am using:
Code:
        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.
__________________
Before you criticize someone, walk a mile in their shoes, that way when you do criticize them, you're a mile away and you have their shoes!

Reply With Quote
  #2  
Old August 31st, 2003, 08:35 PM
Baltor's Avatar
Baltor Baltor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 67 Baltor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m
Reputation Power: 5
I *finally* figured it out!

Reply With Quote
  #3  
Old September 1st, 2003, 07:54 AM
ragabash ragabash is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Yuma,AZ
Posts: 11 ragabash User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to ragabash Send a message via Yahoo to ragabash
What was it?

Reply With Quote
  #4  
Old September 1st, 2003, 05:47 PM
Baltor's Avatar
Baltor Baltor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 67 Baltor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m
Reputation Power: 5
This is my new code:
Code:
        self.text = Text(master, height=5, width=20, state=DISABLED)
        self.scroll = Scrollbar(master, command=self.text.yview)
        self.text.configure(yscrollcommand=self.scroll.set)
        self.text.grid(row=2, column=1, rowspan=2)       
        self.scroll.grid(row=2, column=1, rowspan=2, sticky=E)

Basically, I added self.scroll.grid and put it in the same grid postion as the text box.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Scrollbar problem...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway