GoDiagram Web Reference
MoveSelection Method

The collection of objects to be moved; if null, this view's Selection is used.
The distance the objects should be moved.
Whether to adjust the computed destination location by calling SnapPoint. This is normally true, to allow any relevant grids to decide how to control movement of objects.
Move a collection of objects by a given offset.
Syntax
'Declaration
 
Public Overridable Sub MoveSelection( _
   ByVal sel As GoSelection, _
   ByVal offset As SizeF, _
   ByVal grid As Boolean _
) 
public virtual void MoveSelection( 
   GoSelection sel,
   SizeF offset,
   bool grid
)

Parameters

sel
The collection of objects to be moved; if null, this view's Selection is used.
offset
The distance the objects should be moved.
grid
Whether to adjust the computed destination location by calling SnapPoint. This is normally true, to allow any relevant grids to decide how to control movement of objects.
Remarks

This method heeds the CanMoveObjects property if sel is this view's Selection, and the CanMove predicate for each GoObject that is not an IGoLink. To accomplish the move, each object's DoMove is called, to support object-specific move behavior. All actions take place within a GoUndoManager.MoveSelectionName transaction. This does not raise the SelectionMoved event; that event is raised by the GoToolDragging tool's GoToolDragging.DoMouseUp method. If there are any duplicates in the selection, objects may get moved multiple times. Note that an object may be moved twice if both it and one of its parents are in the selection.

When grid is true, each of the non-link objects in the selection sel is "snapped" to the proper location, by calling SnapPoint. It is always each object's GoObject.Location that is snapped to some point. However, links that are in the selection are never "snapped"; they are always moved by the distance that the first movable non-link object in the selection is moved, which may have been grid-snapped. This policy supports moving links without recalculating their paths, as long as their connected ports/nodes are all moved together by the same distance, whether those nodes are "snapped" or not.

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

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback