ReportBeforeObjectAngleChangeEventArgs.Create

Syntax

Create (Report: IReportBox; Sheet: IPrxSheet; Object: ITabObject; Type: TabObjectChangeType, Value: Double; Cancel: Boolean);

Parameters

Report. The component, for which event is generated

Sheet. The report sheet, for which the event is generated

Object. An object, for which an event is generated

Type. Type of change that occurs with an object

Value. The angle by which an object is rotated

Cancel. Indicates whether object rotation must be canceled.

Description

The Create constructor creates an argument of the event that occurs on object rotation.

Comments

By default event arguments are generated automatically on occurring an event. A constructor is required for manual calling the event.

Value of the Value parameter is always positive and is counted clockwise.

Available values of the Cancel parameter:

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.

Custom handler for the OnBeforeObjectChange event in the ReportBox1 component will be created and called in the example.

Add links to the Report, Tab system assemblies.

// Create a custom handler of the OnBeforeObjectChange event
Sub UserOnBeforeObjectChange(Sender: Object; Args: IReportObjectChangeEventArgs);
Begin
    
If Args.Type = TabObjectChangeType.Angle Then
        Debug.WriteLine((Args 
As ReportBeforeObjectAngleChangeEventArgs).NewValue);
    
End If;
End Sub UserOnBeforeObjectChange;
// Call the OnBeforeObjectChange custom event handler    
Sub UserProc;
Var
    Report: IPrxReport;
    Sheet: IPrxSheet;
    Tab: ITabSheet;
    rObject: ITabObject;
    Argument: ReportBeforeObjectAngleChangeEventArgs;
Begin
    Report := ReportBox1.Report.Report;
    Sheet := Report.Sheets.Item(
0);
    Tab := (Sheet 
As IPrxTable).TabSheet;
    rObject := Tab.Objects.Object(
"PrxShape1"As ITabObject;
    Argument := 
New ReportBeforeObjectAngleChangeEventArgs.Create(ReportBox1, Sheet, rObject, TabObjectChangeType.Angle, 15False);
    ReportBox1.OnBeforeObjectChange(ReportBox1, Argument);
End Sub UserProc;

As a result , the UserProc procedure calls the UserOnAfterObjectChange custom event handler.

See also:

ReportBeforeObjectAngleChangeEventArgs