scrolledtext - Create and manipulate a scrolled text widget

SYNOPSIS

scrolledtext pathName ?options?

INHERITANCE

itk::Widget <- Labeledwidget <- Scrolledwidget <- Scrolledtext

STANDARD OPTIONS

activeBackground
exportSelection
insertBackground
insertWidth
selectBackground
background
foreground
insertBorderWidth
padX
selectBorderWidth
borderWidth
highlightColor
insertOffTime
padY
selectForeground
cursor
highlightThickness
insertOnTime
relief
setGrid

See the "options" manual entry for details on the standard options.

ASSOCIATED OPTIONS

activeRelief
elementBorderWidth
jump
troughColor

See the "scrollbar" widget manual entry for details on the above associated options.

spacing1
tabs
spacing2
wrap
spacing3
state

See the "text" widget manual entry for details on the above associated options.

INHERITED OPTIONS

disabledForeground
labelMargin
state
labelBitmap
labelPos
labelFont
labelText
labelImage
labelVariable

See the "labeledwidget" class manual entry for details on the inherited options.

WIDGET-SPECIFIC OPTIONS

Name:                   height
Class:                  Height
Command-Line Switch:	-height

Name:                   hscrollMode
Class:                  ScrollMode
Command-Line Switch:	-hscrollmode

Name:                   sbWidth
Class:                  Width
Command-Line Switch:	-sbwidth

Name:                   scrollMargin
Class:                  Margin
Command-Line Switch:	-scrollmargin

Name:                   textBackground
Class:                  Background
Command-Line Switch:	-textbackground

Name:                   textFont
Class:                  Font
Command-Line Switch:	-textfont

Name:                   visibleitems
Class:                  VisibleItems
Command-Line Switch:	-visibleitems

Name:                   vscrollMode
Class:                  ScrollMode
Command-Line Switch:	-vscrollmode

Name:                   width
Class:                  Width
Command-Line Switch:	-width


DESCRIPTION

The scrolledtext command creates a scrolled text widget with additional options to manage the scrollbars. This includes options to control the method in which the scrollbars are displayed, i.e. statically or dynamically. Options also exist for adding a label to the scrolled text area and controlling its position. Import/export of methods are provided for file I/O.

METHODS

The scrolledtext command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form:

pathName option ?arg arg ...?
Option and the args determine the exact behavior of the command. The following commands are possible for scrolledtext widgets:

ASSOCIATED METHODS

bbox
dlineinfo
mark
tag
compare
get
scan
window
debug
index
search
xview
delete
insert
see
yview

See the "text" manual entry for details on the standard methods.

WIDGET-SPECIFIC METHODS

pathName cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the scrolledtext command.
pathName childsite
Returns the child site widget path name.
pathName clear
Clear the text area of all characters.
pathName configure ?option? ?value option value ...?
Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the scrolledtext command.
pathName import filename ?index?
Load the text from a file into the text area at the index. The filename must exist.
pathName export filename
Write text to a file. If filename exists then contents are replaced with text widget contents.

COMPONENTS

Name:                   text
Class:                  Text

Name:                   horizsb
Class:                  Scrollbar

Name:                   vertsb
Class:                  Scrollbar

EXAMPLE

 option add *textBackground white

 scrolledtext .st -scrollmode dynamic -labeltext "Password File"

 pack .st -padx 10 -pady 10 -fill both -expand yes

 .st import /etc/passwd

AUTHOR

Mark L. Ulferts

KEYWORDS

scrolledtext, text, widget