Tcl/Tk Text Widget Library Module

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:

Module Dependencies

No other modules are required with this module.

Module Definition Files

This module does not require any definition files.

Module Procedures

gotoline

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.

lineno

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.

textlines

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.

Goto Top | Tcl Applications | Tcl Software Overview | Tcl Library Overview
| Future Lab Home | Contact Webmaster | Feedback

Copyright © 2006 Future Lab, Last Updated Jul 01, 2006