Undo
PowerScript function
Description
Cancels the last edit in an edit control, restoring the text to the
content before the last change.
Applies to
DataWindow, MultiLineEdit, RichTextEdit, and SingleLineEdit
controls
Syntax
|
1 |
editname.Undo ( ) |
|
Argument |
Description |
|---|---|
|
editname |
The name of the DataWindow control, MultiLineEdit, |
Return value
Integer.
Returns 1 when it succeeds and -1 if an error occurs. If editname is
null, Undo returns null.
Usage
To determine whether the last action can be canceled, call the
CanUndo function.
Examples
This statement reverses the last edit in MultiLineEdit
mle_Contact:
|
1 |
mle_Contact.Undo() |
The following statement checks to see if the last edit in the
MultiLineEdit mle_Contact can be reversed, and if so reverse it:
|
1 |
IF mle_Contact.CanUndo() THEN mle_Contact.Undo() |
See also