TXTextControl.CurrentInputPosition Property

Returns or sets an array of three values which specify the page, line and column number of the current text input position. These values are the same as shown in Text Control's status bar.


TXTextControl.CurrentInputPosition [= Array]
Index Description

Specifies the current page number. The first page has the number one.


Specifies the current line number. The first line has the number one.


Specifies the current column number. The first column has the number one.

Data Types

Array of 3 Long.


Run time only.


The following code snippet demonstrates how to use the CurrentInputPosition property to get the current position of the caret in the document and afterwards set its position to the very beginning of the text.

 ' Get current position
  cur = TXTextControl1.CurrentInputPosition
  deb = Str(cur(0)) + "-" + Str(cur(1)) + "-" + Str(cur(2))
  MsgBox deb
  ' Set new position
  cur(0) = 1 ' page
  cur(1) = 1 ' line
  cur(2) = 0 ' col
  TXTextControl1.CurrentInputPosition = cur

See Also