Please enable JavaScript to view this site.

ESL Documentation

Drawing Statement

Insert text at a specified location in a textual region, list box, or alphanumeric spin button, or insert ticks in a slider.

For Textual Regions:

insert

{ [at cursor|after cursor]

{ TEXT_STRING

| segment [column] COL_NO [line] LINE_NO

[thru [column] COL_NO [line] LINE_NO] from TR_NAME }

| block [column] COL_NO [line] LINE_NO

[thru [column] COL_NO [line] LINE_NO] from TR_NAME

| [colored] file FILE_NAME }

For List Boxes and Alphanumeric Spin Buttons:

insert {TEXT_STRING|file ASCII_FILE_NAME}

For Sliders:

insert ticks every TICK_OFFSET

[from LOW_INCREMENT thru HIGH_INCREMENT]

size TICK_SIZE

at cursor

Insert the text at the cursor position. This is the default.

after cursor

Insert the text one column to the right of the cursor position.

TEXT_STRING

A string value representing the text to be inserted.

segment

Insert the specified segment.

column COL_NO

An integer value representing the column numbers of the first and last characters to be inserted.

line LINE_NO

An integer value representing the line numbers of the first and last characters to be inserted.

TR_NAME

The identifier for the textual region from which you want to copy a specified segment or block of text.

block

Insert the specified block. If the block contains character positions that do not contain any text, these positions contain blanks when the block is inserted. After execution, the text cursor has not moved.

colored

Insert the specified color-attributed file into a textual region.

file FILE_NAME

A string value representing the name, including the extension, of an ASCII or color-attributed file you want to insert into the textual region.

file ASCII_FILE_NAME

Insert an ASCII text file into a list box or alphanumeric spin button, where ASCII_FILE_NAME represents the name, including the extension, of the file. The lines are added to the end of the alphanumeric spin button. If a list box is sorted, the lines of the specified text file are inserted in ascending or descending order. Otherwise, the lines are added to the end of the list.

ticks every TICK_OFFSET

An integer value that sets the offset between tick marks along the slider's scale.

from LOW_INCREMENT thru HIGH_INCREMENT

Integer values that set the position for the first and last tick marks.

size TICK_SIZE

An integer value of 0 or 1. Size 0 will remove ALL tickmarks. Size 1 will insert ticks in the range specified.

Description

For textual regions, you can insert a string value, a specified segment or block of text from another textual region, or an ASCII or color-attributed file. If text is inserted where there is no text, ESL will insert any necessary blanks up to the text cursor before doing the insert.

Valid control characters are \b (or \^H), \t (or \^I), and \n (or \^J). All other control characters are ignored. When you use \t, ESL expands it to spaces up to the next tab stop. The control character \t is valid only for textual regions. To set the number of spaces for each tab, see the ESL System Support manual for a description of the TABWIDTH specification.

For textual regions, insert at cursor inserts the text string or segment at the current position of the text cursor. All text after the inserted text is moved to the right (or down, if the text contains one or more newlines). After the insertion, the text cursor is positioned on the first character following the last inserted character. This is the same character on which the text cursor was positioned before the insertion, but it is now in a new position.

For textual regions, insert after cursor inserts the text string or segment beginning one column to the right of the text cursor. All text after the inserted text is moved to the right (or down, if the text contains one or more newlines). After the insertion, the text cursor is positioned on the last inserted character.

For textual regions, blocks are inserted at the current cursor position.

For sorted list boxes, TEXT_STRING inserts a string into its sorted position, and all text after the inserted string is moved down. For unsorted list boxes, TEXT_STRING inserts a string at the end of the list.

For alphanumeric spin buttons, new values are inserted after the last value in the spin button.

For more information about insertion into sliders, see the slider Definition.

To insert rows and columns into a table, see the description of the table Object Definition.

If the program is compiled with external strings, then any string literals used in this statement will be externalized.

Example

textual region Writer

window size 30 columns 10 lines

at position 10 10

insert "Now is the time:" time

 

textual region Writer

window size 30 columns 10 lines

at position 10 10

insert segment 3 1 thru 5 10 from OldText

 

textual region Writer

window size 30 columns 10 lines

at position 10 10

insert block 5 10 thru 5 19 from OldText

 

textual region Writer

window size 30 columns 10 lines

at position 10 10

insert file "sales.txt"

 

response to AddInfo

add to InfoTextregion

insert "More Information"

 

enabled visible multiple selection list box ListBox2

size 100 127 at position 30 42 in DialogBox2

insert "Choice 1\nChoice 2\nChoice 3"

 

enabled visible multiple selection list box ListBox2

size 100 127 at position 30 42 in DialogBox2

insert file "choices.fil"

See Also

block Definition

read Action Statement

segment Definition

slider Definition

spin button Definition

table Object Definition