CanAddChildren:Boolean;
The CanAddChildren property returns whether child series can be added into the series group. If True, the child series can be added, if False, the child series can not be added.
Executing the example requires a form with the Button1 button, the LanerBox component with the LanerBox1 identifier and the UiErAnalyzer component used as a data source for LanerBox. Workbook of the time series database must be loaded to UiErAnalyzer.
There must be two data series selected in the workbook. Click the button to start executing this example.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Serie: ILanerSerie;
GroupSerie: ILanerGroupSerie;
Begin
If LanerBox1.SelectedSeriesCount > 0 Then
Serie := LanerBox1.SelectedSeries(0);
If Serie Is ILanerGroupSerie Then
GroupSerie := Serie As ILanerGroupSerie;
Serie := LanerBox1.SelectedSeries(1);
If GroupSerie.CanAddChildren Then
Serie.MoveToParent(GroupSerie, 0);
Else WinApplication.InformationBox("The series can not be moved '" + Serie.Name + "' to the group '" + GroupSerie.Name + "'");
End If;
End If;
End If;
End Sub Button1OnClick;
After executing this example the second selected series is moved to the first selected series as a child series. If such movement operation is not available, the information message is displayed.
See also: