GoDiagram Win Reference
CopyToClipboard Method

Put a copy of a collection of objects in the clipboard.
Syntax
'Declaration
 
Public Overridable Sub CopyToClipboard( _
   ByVal coll As IGoCollection _
) 
public virtual void CopyToClipboard( 
   IGoCollection coll
)

Parameters

coll
Remarks

The collection is copied into a new document of the same class as the Document property value. (That document class must have a public zero-argument constructor.) This method then calls GoDocument.MergeLayersFrom this view's document and then calls GoDocument.CopyFromCollection to make a copy of all of the objects in coll in the new document in the appropriate layers. Note that in order to maintain the distinct layers of the objects being copied, each document layer needs to have a unique identifier, Identifier. The new document is then inserted into the clipboard using that document's GoDocument.DataFormat.

To facilitate pasting into regular (not GoDiagram) documents, this method calls CreateDataObject to support additional data formats. If the coll is null or empty, the clipboard is cleared of any previous data values.

All of the objects in the collection will be copied by serializing them. If any of the objects, or any of the objects that they refer to, are not serializable, there will be a serialization exception, and the clipboard might not a copy of the argument collection. Exceptions will be logged to any trace listeners. The User Guide discusses serialization and deserialization in more detail.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoView Class
GoView Members

 

 


© 2015. Northwoods Software Corporation. All Rights Reserved.

Send Feedback