November 1999
Intermediate to advanced
832 pages
19h 28m
English
The characters in a text widget are addressed by their line number and the character position within the line. Lines are numbered starting at one, while characters are numbered starting at zero. The numbering for lines was chosen to be compatible with other programs that number lines starting at one, like compilers that generate line-oriented error messages. Here are some examples of text indices:
| 1.0 | The first character. |
| 1.1 | The second character on the first line. |
| 2.end | The newline character on the second line. |
There are also symbolic indices. The insert index is the position at which new characters are normally inserted when the user types in characters. You can define new indices called marks, too, as described later. Table 33-1 summarizes ...
Read now
Unlock full access