Text Operations

Table 33-9 describes the text widget operations, including some that are not discussed in this chapter. In the table, $t is a text widget:

Table 33-9. Operations for the text widget.
$t bbox indexReturns the bounding box of the character at index. Four numbers are returned: x y width height.
$t cget optionReturns the value of the configuration option.
$t compare i1 op i2Performs index comparison. i1 and i2 are indexes. op is one of < <= == >= > !=
$t configure ...Queries or sets configuration options.
$t debug booleanEnables consistency checking for B-tree code.
$t delete i1 ?i2?Deletes from i1 up to, but not including i2. Just deletes the character at i1 if i2 is not specified.
$t dlineinfo indexReturns the bounding box, in pixels, ...

Get Practical Programming in Tcl & Tk, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.