TX Text Control .NET Server

SubTextPartEventArgs Object

Object|Introduced in 24.0

Description

The event argument object for SubTextPart related events. (e. g. the subTextPartEntered event)

Syntax

{
   id: <number>,
   start: <number>,
   length: <number>,
   name: <string>,
   number: <number>,
   nestedLevel: <number>
}

Examples

The following example demonstrates SubTextPartEventArgs in a practical document-editing workflow. The event argument object for SubTextPart related events. (e. g. the subTextPartEntered event).

function handleSubTextPart(args) {
    console.log("id:", args.id);
    console.log("start:", args.start);
    console.log("length:", args.length);
    console.log("name:", args.name);
}

Members

Properties

PropertyDescription
idThe subtextpart's identifier. Must be a one-based value. A value of zero indicates that the subtextpart has no identifier.
lengthThe length of the SubTextPart in characters.
nameThe name of the subtextpart. An empty string indicates that the subtextpart has no name.
nestedLevelThe subtextpart's nested level. The top level is 1.
numberThe subtextpart's number. The first subtextpart has the number 1. The number is defined through the textflow. A textpart with a smaller start position has a smaller number. When an outer subtextpart has the same start position than one of its nested textparts the outer textpart has a smaller number.
startThe 1-based position of the first character which belongs to the subtextpart.