|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
problems scrolling in text areas
I am having problems using the scrollbar in a text box. When I create the scrollbar the text area shrinks in size, and even when I try to resize the text area, it remains the same. Here is the code!
scrollText1 = Scrollbar(self.text1) scrollText1.config(command = self.text1.yview) self.text1.config(yscrollcommand = scrollText1.set, height = 15, width = 85) scrollText1.pack(side = RIGHT, fill = Y) self.text1.grid(column = 1, row = 2, sticky = N+E+S+W) self.text1 is previously declared. Any suggestions would be very appreciative Thanks! |
|
#2
|
||||
|
||||
|
Personally I use the scrolled text widget:
from ScrolledText import ScrolledText self.text = ScrolledText(self.parent) When you say shrinks in size - what exactly happens? grim ![]()
__________________
*** Experimental Python Markup CGI V2 *** |
|
#3
|
|||
|
|||
|
without the scrollbar the text area is 15 lines,
when i declare a scrollbar to accompany the text area, it shrinks to 6 lines, even when the text area is declared to be larger. This happens no matter where the configuration for the text area is stated. Thanks for the help though, I will probably change my code to use your suggestion if I can't figure it out soon. Thanks again! Liz |
|
#4
|
||||
|
||||
|
The scrollbar needs a container as a parent (Frame,Window), a text box is not enough it seems. If you set the scrollbars parent to be the containing frame the text box should size correctly.
grim ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > problems scrolling in text areas |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|