edit_text

Displays a window for edit texting.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X      

Syntax

expr edit_text(text,max_len,row,col,height,width,wrap)
expr           text 
int            max_len, row, col, height, width, wrap

Description

edit_text() opens an edit window using the data in the text parameter. It returns false and leaves the data unmodified if the user clicks [Cancel] . If the user clicks [OK], it returns true and returns the modified char/string/list in the original text parameter.
text either a char/string or list datatype (windows only), specifies the text to edit.

max_len specifies the maximum edit return text length when text is a char/string. If max_len is zero, a read-only window opens with only an [OK] button. Any text that is a one-coumn list causes the window width to adjust to the max list row size. This adjustment is useful for browsing text, such as help information. If the list has a title, the first line appears in the window title. If the text is a list, this parameter determines whether a window is read-only or modifiable.

row specifies the row position for the edit window. -1 places the upper left of the box at the cursor position. -2 places the box in the center of the screen.

col specifies the column for the edit window. -1 places the upper left of the box at the cursor position. -2 places the box in the center of the screen.

height specifies the window's height.

width specifies the window's width.

wrap controls word wrapping. Set to true, wraps words.

Example

Edits the comment field in a customer order application.
edit_text(comment,field_width()-1,5,5,5,72,true);