Trackball leaves stuff on the screen when disabled

2 posts, 0 answers
  1. scott
    scott avatar
    67 posts
    Member since:
    Jul 2010

    Posted 25 Feb 2013 Link to this post

    Hi.  I have a trackball setup on a chart.

    chart.Controllers.Add(new ChartTrackballController());
    chart.ShowTrackBall = false;

    I have a click handler that toggles the trackball. 

    private void chart_MouseClick(object sender, MouseEventArgs e)
        if (e.Button == System.Windows.Forms.MouseButtons.Right)
            chart.ShowTrackBall = !chart.ShowTrackBall;

    When I disable the trackball it leaves its message box on the screen...  If I toggle the trackball a bunch of times, I end up with a bunch of message boxes on the screen... 

    See the pix for a sample.

    Thoughts? -

  2. Ivan Petrov
    Ivan Petrov avatar
    701 posts

    Posted 28 Feb 2013 Link to this post

    Hello Scott,

    Thank you for writing.

    I was able to reproduce the issue and have logged it in our Public Issue Tracking System - PITS. You can track its progress, subscribe for status changes and add your vote/comment on the following link - PITS Issue. 
    To workaround this issue you can create a custom trackball controller deriving from the default one. In the custom controller you should override the ControllerRemoved method. Your code might look like this:
    public class MyTrackballController : ChartTrackballController
        protected override void ControllerRemoved()
            ChartView view = this.Area.Parent as ChartView;
            ChartWrapper chartWrapper = view.Owner as ChartWrapper;
            if (chartWrapper.Children.Contains(this.Element))

    You will also have to modify your click event handler to use your custom controller:
    private void radChartView1_MouseClick(object sender, MouseEventArgs e)
        if (e.Button == System.Windows.Forms.MouseButtons.Right)
            if (this.radChartView1.ShowTrackBall)
                this.radChartView1.ShowTrackBall = false;
                this.radChartView1.Controllers.Add(new MyTrackballController());
    I have also updated your Telerik points for bringing this issue to our attention.

    I hope this will help. Feel free to write back with any further questions.

    Kind regards,
    Ivan Petrov
    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Join us for a FREE webinar to see all the new stuff in action.

    Interested, but can’t attend? Register anyway and we’ll send you the recording.
  3. DevCraft banner
Back to Top