Abstract
Describes a graphical user interface widget that combines a list box and scroll bars, for the Python programming language's Tkinter widget set.
This publication is available in Web form and also as a PDF document.
Please forward any comments to tcc-doc@nmt.edu.
Table of Contents
ScrolledList widgetScrolledList widget in your Tkinter applicationscrolledlisttest: A small test driverScrolledList moduleclass ScrolledListScrolledList.__init__(): ConstructorScrolledList.__createWidgets(): Lay
out internal widgetsScrolledList.__clickHandler(): Event
handler for button 1ScrolledList.count(): Return the
line countScrolledList.__getitem__(): Implement
the Python index operatorScrolledList.append(): Add a line of
textScrolledList.insert(): Insert a line
of textScrolledList.delete(): Remove a line
of textScrolledList.clear(): Empty the
listbox
This document describes the usage and implementation of a
graphical user interface widget called a ScrolledList, whose
purpose is to display a list of lines of text. This widget
combines a listbox with one or
more scrollbars, so the user can
use the scrollbars to see all the text even if it doesn't
all fit in the available screen space.
This widget works with the Tkinter graphical user interface for the Python programming language.
The document also contains the actual code of the widget,
explained in a lightweight literate programming style,
along with a small test driver script named scrolledlisttest.
Relevant documents:
Python 2.2 quick reference describes the Python language.
Tkinter reference: a GUI for Python describes the Tkinter widget set.
See the author's Lightweight Literate Programming page for an explanation of the technique of embedding the program in its internal documentation.
See also the author's page on the Cleanroom software methodology for a discussion of the author's preferred style of implementation.
Files generated from this document are available online:
scrolledlist.py, the module defining the ScrolledList
widget.
scrolledlisttest, a small test driver.
scrolledlist.xml,
the DocBook source file for this document.