The Tcl/Tk text widget library module has the file name tw.tcl. This module contains procedures specific to Tk text widgets.
Here is a list of procedures in the this module:
No other modules are required with this module.
This module does not require any definition files.
Declaration : proc gotoline {tw row {col 0}} Parameters : Name : tw Type : text widget Description : text widget name Name : row Type : positive integer Description : row/line number Name : col Type : integer Description : column number Returns : 1 upon success, 0 otherwise
This procedure will position the cursor at a specific line and column as well as adjust the view of the text widget.
Declaration : proc lineno {tw indx} Parameters : Name : tw Type : text widget Description : text widget name Name : indx Type : text widget index Description : index position of the cursor Returns : line number upon success, 0 otherwise
This procedure will obtain and return the line number corresponding to the index position of the cursor.
Declaration : proc textlines {tw} Parameters : Name : tw Type : text widget Description : text widget name Returns : total number of lines upon success, 0 otherwise
This procedure will obtain and return the total number of lines in the text widget.