ReportObjectResizingEventArgs.Create

Syntax

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

Parameters

Report. The component, for which event is generated.

Sheet. Report page, for which event is generated.

Object. Object, for which event is generated.

Rect. Coordinates of the rectangular area used by the object.

Side. Changed side.

Cancel. It determines whether object resizing is canceled.

Description

The Create constructor creates an argument of the event that occurs at each object resizing.

Example

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

A custom handler for the OnObjectResizing event in the ReportBox1 component is created and called in the example.

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

// Create a custom handler of the OnObjectResizing event
Sub UserOnObjectResizing(Sender: Object; Args: IReportObjectResizingEventArgs);
Begin
    
Select Case Args.Side
    
Case TabObjectResizingSide.Left:
        Debug.WriteLine(
"Object '" + Args.Object.Id + "' is resized on the left");
    
Case TabObjectResizingSide.Right:
        Debug.WriteLine(
"Object '" + Args.Object.Id + "' is resized on the right");
    
End Select;
End Sub UserOnObjectResizing;
// Call custom handler of the OnObjectResizing event
Public Sub UserProc;
Var
    Report: IPrxReport;
    Sheet: IPrxSheet;
    Tab: ITabSheet;
    rObject: ITabObject;
    Rect: IGxRectF;
    Argument: IReportObjectResizingEventArgs;
Begin
    Report := ReportBox1.Report.Report;
    Sheet := Report.Sheets.Item(
0);
    Tab := (Sheet 
As IPrxTable).TabSheet;
    rObject := Tab.Objects.Object(
"PrxShape1"As ITabObject;
    Rect := 
New GxRectF.Create(10106060);
    Argument := 
New ReportObjectResizingEventArgs.Create(ReportBox1, Sheet, rObject, Rect, TabObjectResizingSide.Left, False);
    UserOnObjectResizing(ReportBox1, Argument);
End Sub UserProc;

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

See also:

ReportObjectResizingEventArgs