TabObjectChangeEventArgs.CreateObjectChangeArgs

Syntax

CreateObjectChangeArgs(TabSheet: ITabSheetBox; Object: ITabObject; Type: TabObjectChangeType);

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.

Description

The CreateObjectChangeArgs constructor creates an argument of the event that occurs on changing 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.

Example

Executing the example requires a form containing the components:

  1. TabSheetBox with the TabSheetBox1 identifier. A handler for the OnAfterObjectChange event should be assigned for the component.

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

Sub UserProc;
Var
    Tab: ITabSheet;
    Object: ITabObject;
    Argument: TabObjectChangeEventArgs;
Begin
    Tab := TabSheetBox1.Source.GetTabSheet;
    Object := Tab.Objects.Item(0);
    Argument := New TabObjectChangeEventArgs.CreateObjectChangeArgs(TabSheetBox1, Object, TabObjectChangeType.Angle);
    TabSheetBox1.OnAfterObjectChange(TabSheetBox1, Argument);
End Sub UserProc;

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

See also:

TabObjectChangeEventArgs