TabObjectResizingEventArgs.Create

Syntax

Create(Sheet: ITabSheetBox; Object: ITabObject; Rect: IGxRectF; Side: TabObjectResizingSide; [Cancel: Boolean]);

Parameters

Sheet. Component, for which event is generated.

Object. Object, for which event is generated.

Rect. Coordinates of rectangular area occupied by the object.

Side. Changed side.

Cancel. It determines whether object size is changed.

Description

The Create constructor creates an argument of the event occurring at each object resize.

Example

Executing the example requires a form containing the TabSheetBox component named TabSheetBox1 and the UiReport component named UiReport1 that is a data source for TabSheetBox1. Set the Active property of the UiReport1 component to True. UiReport1 must contain loaded regular report with shapes on the active list.

Custom handler for the OnObjectResizing  event is created and called in the example in the TabSheetBox1 component.

Add links to the Drawing, Tab, Ui system assemblies.

// Create custom handler of the OnObjectResizing event
Sub UserOnObjectResizing(Sender: Object; Args: ITabObjectResizingEventArgs);
Begin
    Args.Cancel := 
Not WinApplication.ConfirmationBox("Change object sizes: " + Args.Object.Id + "?");
End Sub UserOnObjectResizing;
// Call custom handler of the OnObjectResizing event
Public Sub UserProc;
Var
    Tab: ITabSheet;
    rObject: ITabObject;
    Rect: IGxRectF;
    Argument: TabObjectResizingEventArgs;
Begin
    Tab := TabSheetBox1.Source.GetTabSheet;
    rObject := Tab.Objects.Object(
"PrxShape1");
    Argument := 
New TabObjectResizingEventArgs.Create(TabSheetBox1, rObject, Rect, TabObjectResizingSide.Left, False);
    UserOnObjectResizing(TabSheetBox1, Argument);
End Sub UserProc;

After executing the example the UserProc procedure calls the UserOnObjectResizing custom handler.

See also:

TabObjectResizingEventArgs