| | |
Making a scrollbar follow the last line in a list
Thread Solved |
•
•
Join Date: Dec 2008
Posts: 13
Reputation:
Solved Threads: 0
So I have this simple list and scroll bar combo and I have been trying to make it stay at the bottom of the scroll bar as the text is added so it looks like the scroll bar is just to look back over the previous text.
Like in a text-based game style thing?
Here is la code:
Like in a text-based game style thing?
Here is la code:
python Syntax (Toggle Plain Text)
from Tkinter import * root = Tk() displayscrollbar = Scrollbar(root) scrollbar.pack( side = RIGHT, fill=Y ) display = Listbox(root, yscrollcommand = scrollbar.set ) for line in range(100): display.insert(END, "This is line number " + str(line)) display.pack( side = LEFT, fill = BOTH ) scrollbar.config( command = display.yview ) mainloop()
![]() |
Similar Threads
- Ubuntu Command-line Editing and History Exercise (Getting Started and Choosing a Distro)
- Updated : Simple ASP.Net Login Page (ASP.NET)
- html/php form for .htaccess validation (PHP)
- need help making scrollbar (HTML and CSS)
- Tell us about yourself! (Community Introductions)
- DriveCrypt and Encryption (Community Introductions)
- Make your own money!!! (Community Introductions)
- Help with programming assignment (Python)
- Help with booting up, Windows 98 and XP issue (Windows NT / 2000 / XP)
Other Threads in the Python Forum
- Previous Thread: Replace words in a file
- Next Thread: Threading or pyHook?
| Thread Tools | Search this Thread |
alarm assignment avogadro beginner bluetooth character cipher cmd code customdialog cx-freeze data decimals dictionary directory dynamic error examples exe file float format function generator getvalue gnu graphics gui halp homework http ideas import input ip itunes java keycontrol leftmouse line linux list lists loop maintain maze millimeter module mouse mysqldb number numbers output parsing path port prime programming projects push py2exe pygame pyglet pyqt python queue random recursion schedule screensaverloopinactive script scrolledtext slicenotation sqlite ssh string strings sudokusolver terminal text thread threading time tlapse tuple tutorial ubuntu unicode urllib urllib2 variable variables ventrilo verify vigenere web webservice wikipedia wxpython xlib





