Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Cut – PB Docs 126 – PowerBuilder Library

Cut – PB Docs 126

Cut PowerScript function

Description

Deletes selected text or an OLE object from the specified
control and stores it on the clipboard, replacing the clipboard
contents with the deleted text or object.

Controls

DataWindow, InkEdit, MultiLineEdit, SingleLineEdit, DropDownListBox, DropDownPictureListBox,
and OLE controls

Syntax

Argument

Description

controlname

The name of the DataWindow, InkEdit,
MultiLineEdit, SingleLineEdit, RichTextEdit, DropDownListBox, DropDownPictureListBox,
or OLE control containing the text or object to be cut.

If controlname is a DataWindow, text
is cut from the edit control over the current row and column. If controlname is
a DropDownListBox or DropDownPictureListBox, the AllowEdit property
must be true.

Return Values

Integer for DataWindow, InkEdit, and
list boxes, Long for other controls.

For editable controls, Cut returns the
number of characters that were cut from controlname and
stored in the clipboard. If no text is selected, no characters are cut
and Cut returns 0. If an error occurs, Cut returns
-1.

For OLE controls, Cut returns 0 if it succeeds
and one of the following negative values if an error occurs:

  • -1 Container is empty

  • -2 Cut failed

  • -9 Other error

If controlname is null, Cut returns null.

Usage

To select text for deleting, the user can use the mouse or
keyboard. You can also call the SelectText function
in a script. For RichTextEdit controls, there are several additional
functions for selecting text: SelectTextAll, SelectTextLine,
and SelectTextWord.

To insert the contents of the clipboard into a control, use
the Paste function.

To delete selected text or an OLE object but not store it
in the clipboard, use the Clear function.

Cutting an OLE object breaks any connections between it and
its source file or storage, just as Clear does.

Examples

Assuming the selected text in mle_emp_address is
Temporary, this statement deletes Temporary from mle_emp_address,
stores it in the clipboard, and returns 9:

This example cuts the OLE object in the OLE control ole_1 and
puts it on the clipboard:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x