Puts selected text or an OLE object on the clipboard. Copy does not change the source text or object.
DataWindow, MultiLineEdit, SingleLineEdit, RichTextEdit, DropDownListBox, DropDownPictureListBox, OLE controls, and OLE DWObjects (objects within a DataWindow object that is within a DataWindow control)
objectref.Copy ( )
Argument |
Description |
---|---|
objectref |
One of the following:
The fully qualified name for a DWObject has this syntax: dwcontrol.Object.dwobjectname
If objectref is a DataWindow, text is copied from the edit control over the current row and column. If objectref is a DropDownListBox, its AllowEdit property must be true. |
Integer
For edit controls, Copy returns the number of characters that were copied to the clipboard. If no text is selected in objectref, no characters are copied and Copy returns 0. If an error occurs, Copy returns -1. If objectref is null, Copy returns null.
To select text for copying, the user can use the mouse or keyboard. You can also call the SelectText function in a script.
To insert the contents of the clipboard into a control, use the Paste function.
Copy does not delete the selected text or OLE object. To delete the data, use the Clear or Cut function.
Assuming the selected text in mle_emp_address is Temporary Address, these statements copy Temporary Address from mle_emp_address to the clipboard and store 17 in copy_amt:
integer copy_amt
copy_amt = mle_emp_address.Copy()