TabBeforeObjectRectChangeEventArgs.Create

Syntax

TabBeforeObjectAngleChangeEventArgs(TabSheet: ITabSheetBox;
                       Object: ITabObject;
                       Type: TabObjectChangeType;

                       Value: IGxRectF;

                       Cancel: Boolean);

Parameters

TabSheet. The component, for which an event is generated.

Object. An object, for which an event is generated.

Type. Type of change that occurs with an object.

Value. Object's new position and size.

Cancel. Indicates whether object rotation must be canceled.

Description

The Create constructor creates an argument of the event that occurs before moving or resizing an object.

Comments

By default event arguments are generated automatically on occurring an event. A constructor is required for manual calling the event. For details about manual event generation see the Manual generation of Events section.

Available values of the Cancel parameter:

Example

Executing the example requires a form containing the components:

  1. TabSheetBox with the TabSheetBox1 identifier. The OnBeforeObjectChange event handler must be assigned for this component.

  2. UiReport with the UiReport1 identifier that is a data source for TabSheetBox1. UiReport1 must also be active and contain a loaded regular report with shapes on an active sheet.

Add a link to the Drawing system assembly.

Sub UserProc;
Var
    Tab: ITabSheet;
    tObject: ITabObject;
    Rect: IGxRectF;
    Argument: TabBeforeObjectRectChangeEventArgs;
Begin
    Tab := TabSheetBox1.Source.GetTabSheet;
    tObject := Tab.Objects.Item(0);
    Rect := New GxRectF.Create(10106060);
    Argument := New TabBeforeObjectRectChangeEventArgs.Create(TabSheetBox1, tObject, TabObjectChangeType.Rect, Rect, False);
    TabSheetBox1.OnBeforeObjectChange(TabSheetBox1, Argument);
End Sub UserProc;

After executing the example the procedure calls the OnBeforeObjectChange event in the TabSheetBox1 component.

See also:

TabBeforeObjectRectChangeEventArgs