Hi
Simple question, exists a property or method that allows hide or show a serie in the TeeListBox as ShowInLegend property of ISeries ??
Thanks in advance.
Show in TeeListBox
Hi ACC,
There's no method to show/hide series individually from a TeeListBox yet but you can assign a group to the TeeListBox. So you can create your custom group and the TeeListBox will only show the series you wish.
At the following example I use ComboBoxes to select the series to show. But note that in each ComboBox I delete and create again the SeriesGroup:
There's no method to show/hide series individually from a TeeListBox yet but you can assign a group to the TeeListBox. So you can create your custom group and the TeeListBox will only show the series you wish.
At the following example I use ComboBoxes to select the series to show. But note that in each ComboBox I delete and create again the SeriesGroup:
Code: Select all
Private Sub Check1_Click()
TChart1.SeriesList.Groups.Delete 0
TChart1.SeriesList.AddGroup "Group 0"
If Check1.Value Then
TChart1.SeriesList.Groups.Items(0).Add 0
End If
If Check2.Value Then
TChart1.SeriesList.Groups.Items(0).Add 1
End If
TeeListBox1.SeriesGroup = TChart1.SeriesList.Groups.Items(0)
TeeListBox1.UpdateSeries
End Sub
Private Sub Check2_Click()
TChart1.SeriesList.Groups.Delete 0
TChart1.SeriesList.AddGroup "Group 0"
If Check1.Value Then
TChart1.SeriesList.Groups.Items(0).Add 0
End If
If Check2.Value Then
TChart1.SeriesList.Groups.Items(0).Add 1
End If
TeeListBox1.SeriesGroup = TChart1.SeriesList.Groups.Items(0)
TeeListBox1.UpdateSeries
End Sub
Private Sub Form_Load()
TChart1.AddSeries scBar
TChart1.AddSeries scBar
TChart1.Series(0).FillSampleValues
TChart1.Series(1).FillSampleValues
TChart1.SeriesList.AddGroup "Group 0"
'you should set the ComboBoxes to Checked by default
TChart1.SeriesList.Groups.Items(0).Add 0
TChart1.SeriesList.Groups.Items(0).Add 1
TeeListBox1.Chart = TChart1
TeeListBox1.SeriesGroup = TChart1.SeriesList.Groups.Items(0)
End Sub
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
And I can announce the new property "Items" for TeeListBoxes, available for the next release v8. So you will be able to do:
Code: Select all
TeeListBox1.Items.Remove (0)
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |