TabBeforeObjectAngleChangeEventArgs(TabSheet: ITabSheetBox;
Object: ITabObject;
Type: TabObjectChangeType;
Angle: Double;
Cancel: Boolean);
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.
Angle. The angle by which an object is rotated.
Cancel. Indicates whether object rotation must be canceled.
The Create constructor creates an argument of the event that occurs on object rotation.
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.
Value of the Angle parameter is always positive and is counted clockwise. For example, if an object is rotated clockwise by 15 degrees, the parameter value must be 15, and if an object is rotated by 15 degrees counterclockwise, the value must be 345.
Available values of the Cancel parameter:
True. Object rotation is canceled.
False. Object rotation is performed.
Executing the example requires a form containing the components:
TabSheetBox with the TabSheetBox1 identifier. The OnBeforeObjectChange event handler must be assigned for this component.
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.
Sub UserProc;
Var
Tab: ITabSheet;
Object: ITabObject;
Argument: TabBeforeObjectAngleChangeEventArgs;
Begin
Tab := TabSheetBox1.Source.GetTabSheet;
Object := Tab.Objects.Item(0);
Argument := New TabBeforeObjectAngleChangeEventArgs.Create(TabSheetBox1, Object, TabObjectChangeType.Angle, 15, False);
TabSheetBox1.OnBeforeObjectChange(TabSheetBox1, Argument);
End Sub UserProc;
After executing the example the procedure calls the OnBeforeObjectChange event in the TabSheetBox1 component.
See also: