scrolledtext |
||||
|
The scrolledtext widget behaves exact as the text widget with the additional feature that there appear scrollbars if the text exceeds the window. This widget is made with a frame widget, a text widget and two scrollbar widgets. Formally it is a mega widget. A text widget displays one or more lines of text and allows that text to be edited. Text widgets support four different kinds of annotations on the text, called tags, marks, embedded windows or embedded images. Tags allow different portions of the text to be displayed with different fonts and colors. In addition, Tcl commands can be associated with tags so that scripts are invoked when particular actions such as keystrokes and mouse button presses occur in particular ranges of the text. See TAGS below for more details. The second form of annotation consists of marks, which are floating markers in the text. Marks are used to keep track of various interesting positions in the text as it is edited. See marks below for more details. The third form of annotation allows arbitrary windows to be embedded in a text widget. See embedded windows below for more details. The fourth form of annotation allows Tk images to be embedded in a text widget. See embedded images below for more details. The text widget also has a built-in undo/redo mechanism. See undo mechanism below for more details. |