質問

I am using the zooming of TCHART. In our application we have a Next and Prev Button using which user can do Zoom and UndoZoom. Can you let me know how I can fire zoom and undozoom event on click on this two Buttons

役に立ちましたか?

解決

You can either call the even methods directly (see code below) or use the calls that will fire the events (see commented code below).

Private Sub Command1_Click()
    TChart1_OnZoom
    'TChart1.Zoom.ZoomRect 0, 0, 100, 100
End Sub

Private Sub Command2_Click()
    TChart1_OnUndoZoom
    'TChart1.Zoom.Undo
End Sub

Private Sub TChart1_OnUndoZoom()
    TChart1.Header.Text.Clear
    TChart1.Header.Text.Add "Unzoom!"
End Sub

Private Sub TChart1_OnZoom()
    TChart1.Header.Text.Clear
    TChart1.Header.Text.Add "Zoom!"
End Sub
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top