Code: Select all
Private Sub Check1_Click(Index As Integer)
Debug.Print "Index is " & Index
If Check1(Index).Value = vbChecked Then
If gbDarkBackground Then
frmPI.TChart(Index).Axis.Custom(0).GridPen.Color = DARK_GRID_COLOUR
Else
frmPI.TChart(Index).Axis.Custom(0).GridPen.Color = LIGHT_GRID_COLOUR
End If
frmPI.TChart(Index).Axis.Custom(0).SetMinMax 0, 4
frmPI.TChart(Index).Axis.Custom(0).Increment = 1
frmPI.TChart(Index).Axis.Custom(0).GridPen.Visible = True
frmPI.TChart(Index).Axis.Custom(0).Visible = True
frmPI.TChart(Index).Axis.Custom(0).AxisPen.Visible = True
frmPI.TChart(Index).Axis.Custom(0).Labels.Visible = False
Else
frmPI.TChart(Index).Axis.Custom(0).GridPen.Visible = False
frmPI.TChart(Index).Axis.Custom(0).Visible = True
frmPI.TChart(Index).Axis.Custom(0).AxisPen.Visible = True
frmPI.TChart(Index).Axis.Custom(0).Ticks.Visible = False
frmPI.TChart(Index).Axis.Custom(0).Labels.Visible = False
End If
End Sub
Private Sub Check1_Click_old(Index As Integer)
Debug.Print "Index is " & Index
If Check1(Index).Value = vbChecked Then
If gbDarkBackground Then
frmPI.TChart(Index).Axis.Left.GridPen.Color = DARK_GRID_COLOUR
Else
frmPI.TChart(Index).Axis.Left.GridPen.Color = LIGHT_GRID_COLOUR
End If
frmPI.TChart(Index).Axis.Left.SetMinMax 0, 4
frmPI.TChart(Index).Axis.Left.Increment = 1
frmPI.TChart(Index).Axis.Left.GridPen.Visible = True
frmPI.TChart(Index).Axis.Left.Visible = True
frmPI.TChart(Index).Axis.Left.AxisPen.Visible = True
frmPI.TChart(Index).Axis.Left.Labels.Visible = False
Else
frmPI.TChart(Index).Axis.Left.GridPen.Visible = False
frmPI.TChart(Index).Axis.Left.Visible = True
frmPI.TChart(Index).Axis.Left.AxisPen.Visible = True
frmPI.TChart(Index).Axis.Left.Ticks.Visible = False
frmPI.TChart(Index).Axis.Left.Labels.Visible = False
End If
End Sub