TChart Commander

TeeChart for ActiveX, COM and ASP
Post Reply
Learner
Newbie
Newbie
Posts: 1
Joined: Thu Nov 27, 2003 5:00 am
Location: New Mexico, USA
Contact:

TChart Commander

Post by Learner » Mon May 10, 2004 3:11 pm

Hello!

Is it possible to limit the functionality to the Commander? I want the customer to be able to use only a limited number of the Commander functions?

Regards,

--Learner

Pep
Site Admin
Site Admin
Posts: 3305
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon May 10, 2004 11:42 pm

Hi,

yes, you can customize the buttons of the TeeCommander. You can see one example of this in the TeeChart Pro Demo Features project under :
Welcome ! -> Previous version -> Miscellaneous -> TeeCommander -> Custom Buttons

MikeC
Newbie
Newbie
Posts: 8
Joined: Mon May 21, 2001 4:00 am
Location: W. Yorkshire, UK

Post by MikeC » Tue May 11, 2004 9:30 am

Pep,

Sorry if I'm hijacking this thread but.............

When you define which buttons are available using an array (as in the example), it's not possible to set a default (ie the 'arrow' button is not depressed when the control is shown).

This causes 2 problems (we're using this on a web page) :

1. The user has no idea which tool is initially selected.

2. If you click and drag on the chart with the right mouse button (ie attempt to scroll the chart) without first selecting the 'arrow' tool, the chart jumps into 3D - can you please confirm this happens at your end.

Users are (understandably) finding this very annoying.

Could you please let me know if/when there will be a fix for this.

If it's not possible to define which button is selected could you at least make it so that the 'first' button (as defined in the array) is selected by default.

Best regards,

Mike

Pep
Site Admin
Site Admin
Posts: 3305
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue May 11, 2004 3:10 pm

Hi Mike,
Could you please let me know if/when there will be a fix for this.
Yes, these are a known bugs (already added on our defect list), a fix for them will be considered to inclusion for the next maintenance release.
In meantime a workaround could be to use 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

MikeC
Newbie
Newbie
Posts: 8
Joined: Mon May 21, 2001 4:00 am
Location: W. Yorkshire, UK

Post by MikeC » Wed May 12, 2004 7:54 am

Thanks for the code Pep.

It solves the problem of the chart changing to '3D' view when the right mouse button is pressed (kind of.....). However, it still appears to zoom in when the user attempts to scroll the chart (I originally thought this was caused by the chart having to redraw when it changed into 3D to allow for display of the 'depth' of the chart, but this is obviously not the case). Is there another workaround for this ?

I'd appreciate it if you could let me know when we have a fix for the original problem (or a least an estimate of when I'll be able to set which button is selected in TeeCommander when defining the buttons with an array).

Cheers,

Mike

Pep
Site Admin
Site Admin
Posts: 3305
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu May 13, 2004 2:50 pm

Hi Mike,
However, it still appears to zoom in when the user attempts to scroll the chart (I originally thought this was caused by the chart having to redraw when it changed into 3D to allow for display of the 'depth' of the chart, but this is obviously not the case). Is there another workaround for this ?
I'm sorry, I cannot reproduce the problem here (using the latest v6.05) and the code I post here. Could you plese post an example with which I can see the problem ?
I'd appreciate it if you could let me know when we have a fix for the original problem (or a least an estimate of when I'll be able to set which button is selected in TeeCommander when defining the buttons with an array).
We'll try to fix for the next maitnenance release, but I cannot tell for sure the date, normally the time interval of each maintenance release is 6-7 weeks. We'll post a message here when it's ready.

Post Reply