TE Edit Control Java / HTML-JavaScript Help
Product page

TerGetTag

Retrieve the tag at the specified text position:

int TerGetTag ( line, col)
int TerGetTagEx ( line, col, type)
int TerGetTagEx ( line, col, type)
int line;The line position of the text. Set to -1 to use the current cursor position.
int col;The column position of the text. This parameter is ignored if the 'line' parameter is set to -1.
int type; Tag type (used by TerGetTagEx function only):
TERTAG_BKM:Bookmark tags
TERTAG_USER:Generic tags

Upon a successful return from this method, the following information can be retrieved by using TerGetOutInt and related methods:

String name;

The tag name.

Upon a successful return from this method, the name can be retrieve as following:

name=tej.TerGetOutStr("Name")
String AuxText;

The auxiliary text String associated with the tag.

Upon a successful return from this method, the auxiliary text can be retrieve as following:

AuxText=tej.TerGetOutInt("AuxText")
int AuxInt;

The auxiliary numeric data associated with the tag.

Upon a successful return from this method, the auxiliary integer value can be retrieve as following:

RowId=tej.TerGetOutInt("RowId")
Object obj;

The external object associated with the tag.

Upon a successful return from this method, the object value can be retrieve as following:

obj=tej.TerGetOutObject("Object")

Return Value: This function returns the unique tag id at the specified location. It returns 0 if no tag is found at the location, or if an error is encountered.