Express > Express Assembly Classes > LanerBox > LanerBox.OnAddAttribute
OnAddAttribute(Sender: Object; Args: ILanerBoxAttributeEventArgs);
Sender. The component that generated the event.
Args. Event parameters.
The OnAddAttribute occurs when columns with values of indicator attributes are added to a workbook.
Parameters of this event cannot be changed. Args.Index returns index of the added attribute.
Executing the example requires a form, the LanerBox component named LanerBox1 on the form and the UiErAnalyzer component that is a data source for LanerBox. A workbook of the time series database should be loaded to UiErAnalyzer1. The Memo component named Memo1 is also available on the form.
The described procedure must be assigned as a handler of the OnAddAttribute event for LanerBox.
Sub LanerBox1OnAddAttribute(Sender: Object; Args: ILanerBoxAttributeEventArgs);
Var
ColCount: Integer;
Begin
ColCount := Args.Index + 1;
Memo1.Lines.Clear;
Memo1.Lines.Add("Number of additional columns containing attributes: " + ColCount.ToString);
End Sub LanerBox1OnAddAttribute;
After columns containing indicator attribute values are added to the workbook, the Memo1 component shows the number of these columns.
See also: