Hi
How do i reset the scroll values that is made active by selecting the right click of mouse.
I have left mouse for scroll and right mouse for scroll
After I scroll all arnd the place, and I press reset I need to return to where my graph when it loaded.
Also when i scroll my marks dont scroll with it, but the graph point does.
How to reset the Scroll Values that is made active default
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Shawn,
Please, have a look at he example below. It does everything you request.
Please, have a look at he example below. It does everything you request.
Code: Select all
Dim LeftMin, LeftMax, BottomMin, BottomMax As Integer
Dim AxisValuesNotSet As Boolean
Private Sub Command1_Click()
With TChart1.Axis
.Left.SetMinMax LeftMin, LeftMax
.Bottom.SetMinMax BottomMin, BottomMax
End With
End Sub
Private Sub Form_Load()
TChart1.Series(0).FillSampleValues 10
TChart1.Series(0).Marks.Visible = True
TChart1.Zoom.Enable = False
TChart1.Scroll.MouseButton = mbLeft
AxisValuesNotSet = True
End Sub
Private Sub TChart1_OnAfterDraw()
If AxisValuesNotSet Then
With TChart1.Axis
LeftMin = .Left.Minimum
LeftMax = .Left.Maximum
BottomMin = .Bottom.Minimum
BottomMax = .Bottom.Maximum
End With
AxisValuesNotSet = False
End If
End Sub
Please see TChart1_OnAfterDraw and Command1_Click events code.How do i reset the scroll values that is made active by selecting the right click of mouse.
Left mouse button default function is zooming, to let scroll with that button we first have to assign zoom another button or disable it, see Form_Load.I have left mouse for scroll and right mouse for scroll
Adding a TChart, a series and a button in a form and using the code above, marks are also scrolled. Could you please post an example where marks are not scrolled so that we can reproduce the problem here?Also when i scroll my marks dont scroll with it, but the graph point does.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |