TE Edit Control Java / HTML-JavaScript Help
Product page

TerGetSelection

Get the beginning and ending positions of a selected text block.

boolean TerGetSelection(out FirstLine, out FirstCol, out EndLine, out EndCol)

Upon a successful return from this method, the TerGetOutInt method can be used to retrieve the temporarily saved values for these variables:

int FirstLine;

Beginning line number of the block. To retrieve this value after calling this method:

  FirstLine=tej.TerGetOutInt("BegLine")
int FirstCol;

Beginning column number of the block. To retrieve this value after calling this method:

  FirstCol=tej.TerGetOutInt("BegCol")
int EndLine;

Last line number of the block. To retrieve this value after calling this method:

  EndLine=tej.TerGetOutInt("EndLine")
int EndCol;

The first non-selected column position. The ending column position is not included in the selected block.

To retrieve this value after calling this method:

  EndCol=tej.TerGetOutInt("EndCol")

Return Value: This function returns true if a text block is selected, otherwise it returns false.