type: always, never, automatic (default: automatic)
When to show scrollbars. If the value is a list of two elements, the first value is for the horizontal scrollbar and the second value for the vertical scrollbar.
type: integer
Pixels between lines after wrap.
type: integer
Pixels below lines.
type: integer
Pixels above lines.
type: boolean (default: 1)
Whether the text in the widget is editable.
type: ONEOF none, char, word
Wrap mode used for the rendering of the cells.
type: ONEOF left, right, center, fill
Justification of the lines in one cell.
type: integer
type: integer
type: integer
type: boolean (default: 1)
Whether the cursor is visible.
type: 1
This sets the focus to the widget. To unset the focus it must be set to another widet.
type: boolean (default: 1)
Whether or not the item is sensitve to user input.
type: boolean (default: 1)
Whether or not the item is visible.
type: string
Name of the widget, can be used to set options in an rc file.
type: string (default: "")
Tcl command which is executed in the global scope if the "show-help" signal is recieved, which is normally the case if the user presses F1 or Ctrl-F1. Before evaluation the following percent strings are substituated TABLE %% | % %w | widget name %h | help type: either "whatsThis" or "tooltip" TABLE
type: string
Message that appear next to this widget when the mouse pointer is held over it for a short amount of time.
A text widget is used to input and show formatted text. Some text commands need an index as parameter. An index can be either a list of the row and the column, both starting at 0, for example "1 7", or a keyword like end, cursor, selectionStart, selectionEnd with an (without space) appended character offset, for example "selectionStart+3".
id delete
Deletes the widget and the associated tcl command.
id configure [-option value...]
Configures the widget. Option may have any of the values accepted on creation of the widget.
id erase startIndex ?endIndex?
Removes all text between startIndex and endIndex. endIndex defaults to end.
id select startIndex ?endIndex?
Select the text between startIndex and endIndex. endIndex defaults to end.
id get startIndex ?endIndex?
Returns the text between startIndex and endIndex. endIndex defaults to end.
id cut
Copies all text to the clipboard and removes it from the widget.
id copy
Copies all text to the clipboard.
id paste
Pastes text from the clipboard at the current cursor position.
id getLength
Returns the number of characters in the widget.
id getCursor
Returns the position position of the cursor as list of its row and column.
id setCursor index
Sets the cursor to position index.
id insert index text ?-tags taglist?
Inserts and position indext the text text. If taglist is given the text is taged with each element of the list.
id tag create tagName [-option value...]
Creates a tag with name tagName and configures it dependent of the options given. The options are the same as with tag configure.
id scrollToPosition index [-option value...]
Scrolls the widget so that the specified index is visible.
Options
type: a list of the horizontal and vertical alignment or one of topLeft, top, topRight, left, center, right, bottomLeft, bottom, or bottomRight
Specifies where the index shall be shown.
type: 0 lt float lt 1
Specifies the margin.
id tag configure tagName [-option value...]
Configures the existing tag tagName.
Options
type: color
Background color of the text.
type: color
Foreground color of the text.
type: FONT
Font of the text.
Font family of the text.
type: ONEOF normal, oblique, italic (default: normal)
Font style of the text.
type: ONEOF normal, smallCaps (default: normal)
Font variant of the text.
type: ONEOF ultralight, light, normal, bold, ultrabold, heavy (default: normal)
Font weight of the text.
type: integer (default: 0)
How many pixels the text should be risen.
type: ONEOF ultraCondensed, extraCondensed, condensed, semiCondensed, normal, semiExpanded, expanded, extraExpanded, ultraExpanded (default: normal)
Font stretch of the text.
type: integer
Font size of the text.
type: float ORONEOF xx-small, x-small, small, medium, large, x-large, xx-large (default: normal)
Font scale used.
type: ONEOF none, char, word
Wrap mode used.
type: ONEOF left, right, center, fill
Justification of the lines.
type: boolean (default: 0)
Whether the text is struck through.
type: ONEOF none, single, double, low (default: none)
How the text should be underlined.
type: boolean (default: 0)
Whether the text can be edited.
type: boolean (default: 0)
Whether the text is invisible.