tkinter.scrolledtext --- 捲動文字小工具

原始碼:Lib/tkinter/scrolledtext.py


Thetkinter.scrolledtext module provides a class of the same name whichimplements a basic text widget which has a vertical scroll bar configured to dothe "right thing." Using theScrolledText class is a lot easier thansetting up a text widget and scroll bar directly.

The text widget and scrollbar are packed together in aFrame, and themethods of theGrid andPack geometry managers are acquiredfrom theFrame object. This allows theScrolledText widget tobe used directly to achieve most normal geometry management behavior.

Should more specific control be necessary, the following attributes areavailable:

classtkinter.scrolledtext.ScrolledText(master=None,**kw)
frame

The frame which surrounds the text and scroll bar widgets.

vbar

The scroll bar widget.