Method XbpClipBoard():setBuffer() Foundation

Writes data to the clipboard.

:setBuffer( <xBuffer>, [<nFormatId>] ) --> lSuccess
<xBuffer> contains the data that is written to the clipboard. This parameter can be a character string, an XbpBitmap object, or an XbpMetafile object.
<nFormatId> optionally specifies the format the data passed in <xBuffer> is to be stored into the clipboard in. If a string or an object of either the XbpBitmap or XbpMetafile class is passed in <xBuffer>, parameter <nFormatId> is optional.

This method returns the value .T. (true) if the data could be written to the clipboard, otherwise .F. (false) is returned.


The :setBuffer() method copies data to the clipboard. Three different standard formats can be written to the clipboard: text data in ASCII format, graphic data in the form of a bitmap, or graphic data in the form of a metafile. This method recognizes the data format based on the data type of the <xBuffer> parameter. If graphic data is copied to the clipboard, it must be in the form of an XbpBitmap object or an XbpMetafile object. However, if the data in <xBuffer> should be stored in a user-defined format, the respective format id returned by :registerFormat() must be specified in parameter <nFormatId>.

Before the :setBuffer() method can be executed, the clipboard must have already been opened using the :open() method. Also, the method :clear() must be used to clear the current clipboard contents. If :clear() had not been called, method :setBuffer() may fail.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.