4. System Classes : EntryField Class : MarkSubText Method
 
Share this page                  
MarkSubText Method
The MarkSubText method highlights a subsection of the text in the field.
This method has the following syntax:
EntryField.MarkSubText([startposition = integer]
          [, endposition = integer])
This method has the following parameters:
startposition
Specifies the ordinal position of the first character in the string that you want to highlight
endposition
Specifies the ordinal position of the last character in the string that you want to highlight
If you do not specify the endposition parameter, the method highlights the text from the start position to the end of the text. If you do not specify the startposition parameter, the method highlights the text from the start of the text to the end position.
When you use this method, OpenROAD sets the FirstMarked attribute (see FirstMarked Attribute) to the value specified in the startposition parameter and the LastMarked attribute (see LastMarked Attribute) to the value specified in the endposition parameter.
For example, the following statement highlights character positions three through ten in the entry field, file_name_fld, and sets the FirstMarked attribute to three and the LastMarked attribute to ten:
field(file_name_fld).MarkSubText(startposition = 3,
endposition = 10);
If you include both parameters, you must place a comma between them.