TE Edit Control .NET Core / .NET Framework Help
Product page

TerGetTagPos

Get the text position of a tag.

int TerGetTagPos(TagId, name, type)
bool TerGetTagPos2(TagId, name, type, out line, out col)
int type; Tag type (used by the TerPosTagEx function only):
TERTAG_BKM:Bookmark tag
TERTAG_USER: Generic tag
int TagId;The tag id to search for. This parameter is ignored if the 'name' parameter is specified.
string name;The tag name to search for. Please note that tag names are not unique within a document.
int line;

The line number where the tag is located.

This parameter is used by the TerGetTagPos2 method only.

int col;

The column number where the tag is located.

This parameter is used by the TerGetTagPos2 method only.

Return Value: The TerGetTagPos method searches the given tag to return the absolute character position of the tag. The function returns -1 if the tag is not found in the document.

The TerGetTagPos2 method searches the given tag to return the line/column position of the tag. The function returns a false value if the tag is not found in the document.