TE Edit Control Java / HTML-JavaScript Help
Product page

TerLocateStyle

Locate text with the given character style.

boolean TerLocateStyle(style, ref StartLine, ref StartCol, out StringLen)
WORD style;Style bits:
BOLD:Bold
ULINE:Underline
ULINED:Double Underline
ITALIC:Italic
STRIKE:Strikethrough
SUPSCR:Superscript
SUBSCR:Subscript
HIDDEN:Hidden Text
PROTECT:Protected Text
CAPSAll Caps
SCAPSSmall Caps
PICTPicture

Use the logical OR (|) operator to specify more than one styles. The search is successful when any of the specified styles are located.

int StartLine:

(INPUT/OUTPUT) Specifies the line number to start the search. On a successful search, you can retrieve the new 'StartLine' value using the TerGetOutInt method where a character with the given style is found:

  line=tej.TerGetOutInt("Line");
int StartCol:

(INPUT/OUTPUT) Specifies the column number to start the search. On a successful search, you can retrieve the new 'StartCol' value using the TerGetOutInt method where a character with the given style is found:

  col=tej.TerGetOutInt("Col");

On a successful search, you can retrieve the following additional information using the TerGetOutInt method:

int StringLen:

The length of the located text. The editor matches the text up to the end of the line. Example:

length=tej.TerGetOutInt("StringLen");

Description: Use his function to locate the beginning of the text with the given character styles.

Return Value: This function returns a true value when successful.