IWxShape.GroupBehaviour

Syntax

GroupBehaviour: WxGroupBehaviour;

Description

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

By default, this property is set to ScaleWithGroup (if the group is resized, the object scales up or down).

Example

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

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

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