Move Elements Within Diagrams

As you add new elements to a diagram, you might want to move the existing elements to create more space, make a structure more apparent, or create a child-parent relationship between two elements. There are several ways in which you can move the elements within the diagram.

Move Elements




See also



Change Position

Select an element or group of elements in the diagram, then:

Use the mouse to drag the element or group of elements to the required position (the cursor switches to the four-arrow icon as shown)
Hold down ( Shift ) and use the arrow keys to move the element or group of elements by small increments to the required position




Align Elements

Select a group of elements in the diagram and align them on the last-selected element using:

The Align... options in the right-click context menu or
The Alignment buttons on the Diagram toolbar


Operations on Multiple Elements

Diagram Toolbar



Confirm Possible Parent Elements

If you want to make one element the child of another, you can drag the child onto the parent; the child is then always encapsulated by the parent and moved within the parent.

Not all parent/child element combinations are valid. For example:

Drag a Signal element over a Class; because a Class element can be a parent to a Signal, the Signal element is encapsulated
Drag a Class element over a Signal element; because a Signal cannot be a parent to a Class, the Class element is not encapsulated

To confirm that the proposed parent element is able to accept the selected child element, observe the parent element border as you drag the child element over it. If the parent can accept the selected element as a child, the element border changes to a dashed line. If the border does not change, the selected element cannot be a child to the parent element.



Notes (on Adding child element to parent)

The Support for Composite Objects checkbox must be selected on the Objects page of the Options dialog (select Tools | Options | Objects); if this option is not selected, the dashed border does not show and the child element cannot be embedded on the parent in the diagram
Both elements must already exist on the diagram; the parent element border does not change if you drag a potential child element over it from the Toolbox or Project Browser
The child element must be dragged right over the parent, so that its borders are completely within the parent element borders
The Z-order of the child element is automatically adjusted so that the child is not hidden by the parent
When you embed a child element on its parent, the child element becomes part of the parent element hierarchy in the Project Browser; if you drag the child element out of the parent, the child element becomes independent and is no longer embedded in the parent element hierarchy
If you have selected the Structured Compartment checkbox on the Feature and Compartment Visibility dialog, the child element is confined to the Structured Compartment and cannot be dragged out until the checkbox is deselected again

Learn more