O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required