Page 1 of 1

Chart Event Handlers die when Selector tool is attached

Posted: Mon Jun 15, 2009 3:10 am
by 13051032
I have an issue when selector tool is added to the chart. None of the even handlers fireup when selector tool is added to the chart.

Please see the following code where I have a chart.mousemove event for example. When you run the following code mousemove event never gets fired. When you comment out the selector tool related code, all the events fireup correctly.

Please suggest a solution.

Thanks

Code: Select all

Public Class Form1
    Private WithEvents myChart As New Steema.TeeChart.TChart
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        For a As Integer = 0 To 9
            myChart = New Steema.TeeChart.TChart
            Dim cursortool1 As New Steema.TeeChart.Tools.CursorTool(myChart.Chart)
            Dim series1 As New Steema.TeeChart.Styles.FastLine(myChart.Chart)
            Dim ColorLine1 As New Steema.TeeChart.Tools.ColorLine(myChart.Chart)
            Dim AxisArrowBottom As New Steema.TeeChart.Tools.AxisArrow(myChart.Chart)
            Dim MarksTip1 As New Steema.TeeChart.Tools.MarksTip(myChart.Chart)

            myChart.Dock = DockStyle.Top
            AddHandler myChart.MouseMove, AddressOf MyChart_MouseMove

            cursortool1.FollowMouse = True
            cursortool1.Style = Steema.TeeChart.Tools.CursorToolStyles.Vertical

            'Comment the following three lines to see the mousemove event
            Dim selector1 As New Steema.TeeChart.Tools.Selector(myChart.Chart)
            selector1.AllowDrag = True
            selector1.AllowResizeChart = True

            series1.FillSampleValues(1800)

            ColorLine1.AllowDrag = False
            ColorLine1.Pen.Width = 1
            ColorLine1.Axis = myChart.Axes.Left
            ColorLine1.Pen.Color = Color.Black
            ColorLine1.Value = 0

            Dim AxisArrowLeft As New Steema.TeeChart.Tools.AxisArrow(myChart.Chart)
            AxisArrowLeft.Active = True
            AxisArrowLeft.Axis = myChart.Axes.Left

            AxisArrowBottom.Active = True
            AxisArrowBottom.Axis = myChart.Axes.Bottom

            MarksTip1.Active = True
            MarksTip1.MouseDelay = 30
            MarksTip1.HideDelay = 10000 ' 10 seconds display
            MarksTip1.MouseAction = Steema.TeeChart.Tools.MarksTipMouseAction.Move
            MarksTip1.Style = Steema.TeeChart.Styles.MarksStyles.XY

            Me.Controls.Add(myChart)
        Next
        
    End Sub

    Private Sub myChart_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
        Me.Text = e.Location.ToString
    End Sub
End Class

Re: Chart Event Handlers die when Selector tool is attached

Posted: Mon Jun 15, 2009 11:55 am
by 10050769
Hello asupriya,

I could reproduce your problem and I have added to the list of Bug Report with number [TF02014240] we will try to fix it for next versions of TeeChart .NET.


Thanks,

Re: Chart Event Handlers die when Selector tool is attached

Posted: Mon Jun 15, 2009 1:19 pm
by 13051032
Can you please attach a very high priority to this issue and the one with the fastlineseries (Bug # TF02014233)? These two bugs must be fixed before I can think of using any version above 3.5.3225.32184.

Re: Chart Event Handlers die when Selector tool is attached

Posted: Mon Jun 15, 2009 1:44 pm
by narcis
Hi asupriya,

Both issues were already logged with high priority to be looked at for next maintenance release. I recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements and what's been fixed on them.