It appears that there is a mode where right-click and drag turns on 3d mode and moves the entire chart panel (changes aspect.horizoffset and vertoffset). Using the TeeCommander you can get rid of this by clicking on the select mode, but I need a way to programmatically turn this off. Is there an appropriate API for use here?
The problem is that I have an embedded graph w/ no commander visible in 2-d mode. Simply right-clicking in the chart changes it to 3-d mode with no visible reason why or any way to change it back without diving through many levels of options.
Thanks!
Nathan
How to turn off chart movement via right-click
Hi Nathan,
which TeeChart version are you using ?
using the TeeChart Pro v5.06 and v6.04 I'm able to right-click and drag without get the Chart in 3D mode.
To disable the Scroll (right-click and drag) you must use :
which TeeChart version are you using ?
using the TeeChart Pro v5.06 and v6.04 I'm able to right-click and drag without get the Chart in 3D mode.
To disable the Scroll (right-click and drag) you must use :
Code: Select all
tChart1.Scroll.Enable = pmNone
Pep Jorge
http://support.steema.com
http://support.steema.com
I am using 6.0.0.4. I have made an example excel file to demonstrate the problem. Use "right-click"-save-as to save the file locally.
1) Load the file
2) click on the button
3) Right-click drag in the chart. It'll turn to 3d and the chart will move as a whole (it actually pans and scrolls at the same time!)
4) Click in the teecommander to turn off 3-d mode, now click on the "normal" mode arrow button.
5) Chart now scrolls correctly w/o the panning.
http://www.phoenix-int.com/~nsharp/teeC ... roblem.xls
1) Load the file
2) click on the button
3) Right-click drag in the chart. It'll turn to 3d and the chart will move as a whole (it actually pans and scrolls at the same time!)
4) Click in the teecommander to turn off 3-d mode, now click on the "normal" mode arrow button.
5) Chart now scrolls correctly w/o the panning.
http://www.phoenix-int.com/~nsharp/teeC ... roblem.xls
Hi Nathan,
I see now what you refer. This can be solved using the following code :
I see now what you refer. This can be solved using the following code :
Code: Select all
Private Sub CommandButton1_Click()
TeeCommander1.Chart = TChart1
TChart1.Aspect.View3D = False
TChart1.RemoveAllSeries
TChart1.AddSeries scLine
TChart1.Series(0).AddXY 0, 0, "", clTeeColor
TeeCommander1.Buttons = Array(tcbNormal, tcbRotate, tcbMove, tcbZoom, tcbDepth, tcb3D, tcbSeparator, tcbLabel)
End Sub
Private Sub TChart1_OnMouseDown(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
If Button = mbRight Then
TeeCommander1.ChartLink = -1
End If
End Sub
Private Sub TChart1_OnMouseUp(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
If Button = mbRight Then
TeeCommander1.ChartLink = TChart1.ChartLink
End If
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com