IWxShape.GroupBehaviour

Syntax

GroupBehaviour: WxGroupBehaviour;

Description

The GroupBehaviour property determines an object behavior during resizing of a group that contains this object.

Comments

The default value: ScaleWithGroup.

Example

Executing the example requires a form with the Button1 button, the WorkspaceBox component named WorkspaceBox1 and a data source for the WorkspaceBox1 component.

Add links to the Andy, Drawing, Workspace system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Wsp: IWxWorkspace;
    Shape: IWxShape;
    Reg: IWxRegulargon;
    Rec: IWxRoundedRectangle;
    i: Integer;
Begin
    Wsp := WorkspaceBox1.View.Workspace;
    Reg := Wsp.CreateRegulargon;
    Reg.Id := "Reg1";
    Reg.PinPosition := New GxPointF.Create(122);
    Reg.NumberOfSides := 5;
    Reg.Text := "Trapezoid";
    Rec := Wsp.CreateRoundedRectangle;
    Rec.Id := "Rectangle1";
    Rec.PinPosition := New GxPointF.Create(12.3, -2);
    Rec.RoundingOffset := 9;
    Rec.Text := "Shape";
    Shape := Wsp.Shapes.Item(0);
    Shape.GroupBehaviour := WxGroupBehaviour.RepositionOnly;
    For i := 0 To Wsp.Shapes.Count - 1 Do
        WorkspaceBox1.View.SelectedShapes.Add(Wsp.Shapes.Item(i));
    End For;
    WorkspaceBox1.View.GroupSelectedShapes;
End Sub Button1OnClick;

After executing the example all objects in a workspace are grouped, and if the group is resized, only the size of the first object remains the same.

See also:

IWxShape