Puts selected text from the current row and column of an edit control onto the clipboard. Copy does not change the source text.
integer objectref.Copy ( )
Argument |
Description |
---|---|
objectref |
A reference to a DataWindow control or (PowerBuilder only) The fully qualified name of a OLE DWObject within a DataWindow control that contains the object you want to copy to the clipboard. The fully qualified name for a DWObject has this syntax: dwcontrol.Object.dwobjectname
|
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.
For OLE DWObjects, Copy returns 0 if it succeeds and one of the following negative values if an error occurs:
-1 Container is empty
-2 Copy Failed
-9 Other error
If objectref is NULL, the method returns NULL.
To select text for copying, the user can use the mouse or keyboard. You can also call the SelectText method in a script.
To insert the contents of the clipboard into a control, use the Paste method.
Copy does not delete the selected text or OLE object. To delete the data, use the Clear or Cut method.
Using with other controls
For use with other PocketBuilder controls, see Copy in the PowerScript Reference.
Assuming the selected text in the edit control of dw_emp is Temporary Address, these statements copy Temporary Address to the clipboard and store 17 in copy_amt:
integer copy_amt
copy_amt = dw_emp.Copy()
Clipboard in the PowerScript Reference
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |