XamSyntaxEditor("xamSyntaxEditor1").GetLocationFromOffset 55
This topic provides information about the xamSyntaxEditor™ control’s testable user replay-only methods.
This topic contains the following sections:
The following table briefly explains the replay-only methods for testing controls. Detailed information about the methods is available following the table.
This helper method, allows the offset location to interact with a line or character location, and reverse back to the offset location.
The following table explains the method’s parameters followed by a code example.
This example demonstrates how to translate the character offset of 55 to a location you would call. It will return an object array such as ARRAY(``12,2).
XamSyntaxEditor("xamSyntaxEditor1").GetLocationFromOffset 55
There is no document currently loaded in the xamSyntaxEditor; required to perform this operation.
This helper method, allows the line or character location to interact with the offset, and reverse back to the line or character’s location.
The following table explains the method’s parameters followed by a code example.
This example demonstrates how to translate the location of line number 13, and 3rd character to a character offset of your choice. It will return an integer value of the character location.
XamSyntaxEditor("xamSyntaxEditor1").GetOffsetFromLocation ARRAY(12,2)
There is no document currently loaded in the xamSyntaxEditor; required to perform this operation.
Another possibility is that the TextLocation argument [{0}] is malformed the correct format should be
:\``n iOffsetLocation | ARRAY(iLineIndex,
iCharIndex).
The following topics provide additional information related to this topic.