Problems with cursor after using dragMark tool

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
bairog
Newbie
Newbie
Posts: 72
Joined: Fri Jul 07, 2006 12:00 am
Location: Moscow, Russia
Contact:

Problems with cursor after using dragMark tool

Post by bairog » Wed Jan 21, 2009 1:54 pm

I have a chart, some line series with enabled marks and DragMarks tool. In the begining cursor is an arrow. After moving cursor above any mark it becomes a hand and still the same (hand-type) in every point of chart (no matter above mark or not). I suppose cursore to become hand type only above mark. So what is the problem?
Thank you.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jan 21, 2009 2:09 pm

Hi bairog,

This works fine for me here using latest TeeChart for .NET v3 maintenance release available at the client area. Which TeeChart version are you using?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

bairog
Newbie
Newbie
Posts: 72
Joined: Fri Jul 07, 2006 12:00 am
Location: Moscow, Russia
Contact:

Post by bairog » Wed Jan 21, 2009 4:37 pm

This is code from my project that still making troubles:

Code: Select all

namespace WindowsApplication1
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.dataGridView1 = new System.Windows.Forms.DataGridView();
            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.button3 = new System.Windows.Forms.Button();
            this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
            this.printDocument1 = new System.Drawing.Printing.PrintDocument();
            this.printDialog1 = new System.Windows.Forms.PrintDialog();
            this.fontDialog1 = new System.Windows.Forms.FontDialog();
            this.pageSetupDialog1 = new System.Windows.Forms.PageSetupDialog();
            this.tChart1 = new Steema.TeeChart.TChart();
            this.lineAct = new Steema.TeeChart.Styles.Line();
            this.annotBottom = new Steema.TeeChart.Tools.Annotation();
            this.dragMarks1 = new Steema.TeeChart.Tools.DragMarks();
            this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
            this.SuspendLayout();
            // 
            // dataGridView1
            // 
            this.dataGridView1.AllowUserToAddRows = false;
            this.dataGridView1.AllowUserToDeleteRows = false;
            this.dataGridView1.AllowUserToResizeRows = false;
            this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
            this.dataGridView1.ColumnHeadersHeight = 21;
            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
            this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.Column1,
            this.Column2,
            this.Column3,
            this.Column5});
            this.dataGridView1.Location = new System.Drawing.Point(352, 52);
            this.dataGridView1.Name = "dataGridView1";
            this.dataGridView1.RowHeadersVisible = false;
            this.dataGridView1.Size = new System.Drawing.Size(287, 483);
            this.dataGridView1.TabIndex = 6;
            this.dataGridView1.Visible = false;
            // 
            // Column1
            // 
            this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
            this.Column1.HeaderText = "№,п/п";
            this.Column1.Name = "Column1";
            this.Column1.ReadOnly = true;
            this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            this.Column1.Width = 44;
            // 
            // Column2
            // 
            this.Column2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
            this.Column2.HeaderText = "Дата полета";
            this.Column2.Name = "Column2";
            this.Column2.ReadOnly = true;
            this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            this.Column2.Width = 77;
            // 
            // Column3
            // 
            this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
            this.Column3.HeaderText = "Вылет №";
            this.Column3.Name = "Column3";
            this.Column3.ReadOnly = true;
            this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            this.Column3.Width = 59;
            // 
            // Column5
            // 
            this.Column5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
            this.Column5.HeaderText = "dВиб, мм/с";
            this.Column5.Name = "Column5";
            this.Column5.ReadOnly = true;
            this.Column5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            this.Column5.Width = 71;
            // 
            // toolTip1
            // 
            this.toolTip1.Active = false;
            this.toolTip1.AutoPopDelay = 5000;
            this.toolTip1.InitialDelay = 200;
            this.toolTip1.ReshowDelay = 100;
            // 
            // button1
            // 
            this.button1.Location = new System.Drawing.Point(687, 52);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 7;
            this.button1.Text = "button1";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Visible = false;
            // 
            // button2
            // 
            this.button2.Location = new System.Drawing.Point(788, 52);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(75, 23);
            this.button2.TabIndex = 8;
            this.button2.Text = "button2";
            this.button2.UseVisualStyleBackColor = true;
            this.button2.Visible = false;
            // 
            // button3
            // 
            this.button3.Location = new System.Drawing.Point(12, 52);
            this.button3.Name = "button3";
            this.button3.Size = new System.Drawing.Size(75, 23);
            this.button3.TabIndex = 10;
            this.button3.Text = "Печать";
            this.button3.UseVisualStyleBackColor = true;
            this.button3.Visible = false;
            // 
            // printPreviewDialog1
            // 
            this.printPreviewDialog1.AutoScrollMargin = new System.Drawing.Size(0, 0);
            this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
            this.printPreviewDialog1.ClientSize = new System.Drawing.Size(400, 300);
            this.printPreviewDialog1.Document = this.printDocument1;
            this.printPreviewDialog1.Enabled = true;
            this.printPreviewDialog1.Icon = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
            this.printPreviewDialog1.Name = "printPreviewDialog1";
            this.printPreviewDialog1.Visible = false;
            // 
            // printDialog1
            // 
            this.printDialog1.Document = this.printDocument1;
            this.printDialog1.UseEXDialog = true;
            // 
            // pageSetupDialog1
            // 
            this.pageSetupDialog1.Document = this.printDocument1;
            // 
            // tChart1
            // 
            // 
            // 
            // 
            this.tChart1.Aspect.ElevationFloat = 345;
            this.tChart1.Aspect.RotationFloat = 345;
            this.tChart1.Aspect.View3D = false;
            // 
            // 
            // 
            // 
            // 
            // 
            this.tChart1.Axes.Bottom.Automatic = true;
            // 
            // 
            // 
            this.tChart1.Axes.Bottom.Grid.Style = System.Drawing.Drawing2D.DashStyle.Dash;
            this.tChart1.Axes.Bottom.Grid.ZPosition = 0;
            // 
            // 
            // 
            this.tChart1.Axes.Bottom.Labels.Angle = 90;
            this.tChart1.Axes.Bottom.Labels.Separation = 0;
            this.tChart1.Axes.Bottom.MaximumOffset = 1;
            this.tChart1.Axes.Bottom.MinimumOffset = 1;
            this.tChart1.Axes.Bottom.MinorTickCount = 0;
            // 
            // 
            // 
            this.tChart1.Axes.Depth.Automatic = true;
            // 
            // 
            // 
            this.tChart1.Axes.Depth.Grid.Style = System.Drawing.Drawing2D.DashStyle.Dash;
            this.tChart1.Axes.Depth.Grid.ZPosition = 0;
            // 
            // 
            // 
            this.tChart1.Axes.DepthTop.Automatic = true;
            // 
            // 
            // 
            this.tChart1.Axes.DepthTop.Grid.Style = System.Drawing.Drawing2D.DashStyle.Dash;
            this.tChart1.Axes.DepthTop.Grid.ZPosition = 0;
            // 
            // 
            // 
            this.tChart1.Axes.Left.Automatic = true;
            // 
            // 
            // 
            this.tChart1.Axes.Left.Grid.Style = System.Drawing.Drawing2D.DashStyle.Dash;
            this.tChart1.Axes.Left.Grid.ZPosition = 0;
            // 
            // 
            // 
            this.tChart1.Axes.Left.Labels.Separation = 1;
            this.tChart1.Axes.Left.Labels.ValueFormat = "0.00";
            this.tChart1.Axes.Left.MinorTickCount = 0;
            // 
            // 
            // 
            this.tChart1.Axes.Left.Title.Lines = new string[] {
        ""};
            // 
            // 
            // 
            this.tChart1.Axes.Right.Automatic = true;
            // 
            // 
            // 
            this.tChart1.Axes.Right.Grid.Style = System.Drawing.Drawing2D.DashStyle.Dash;
            this.tChart1.Axes.Right.Grid.ZPosition = 0;
            // 
            // 
            // 
            this.tChart1.Axes.Top.Automatic = true;
            // 
            // 
            // 
            this.tChart1.Axes.Top.Grid.Style = System.Drawing.Drawing2D.DashStyle.Dash;
            this.tChart1.Axes.Top.Grid.ZPosition = 0;
            this.tChart1.Cursor = System.Windows.Forms.Cursors.Default;
            this.tChart1.Dock = System.Windows.Forms.DockStyle.Fill;
            // 
            // 
            // 
            this.tChart1.Footer.Lines = new string[] {
        ""};
            this.tChart1.Footer.Visible = false;
            // 
            // 
            // 
            // 
            // 
            // 
            this.tChart1.Header.Font.Bold = true;
            // 
            // 
            // 
            this.tChart1.Header.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.tChart1.Header.Font.Name = "Microsoft Sans Serif";
            this.tChart1.Header.Font.Size = 12;
            this.tChart1.Header.Font.SizeFloat = 12F;
            this.tChart1.Header.Font.Underline = true;
            this.tChart1.Header.Lines = new string[] {
        "Бортовой номер "};
            this.tChart1.Header.Visible = false;
            // 
            // 
            // 
            this.tChart1.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
            // 
            // 
            // 
            this.tChart1.Legend.Shadow.Visible = true;
            // 
            // 
            // 
            this.tChart1.Legend.Symbol.DefaultPen = false;
            this.tChart1.Legend.Symbol.Visible = false;
            this.tChart1.Legend.TextStyle = Steema.TeeChart.LegendTextStyles.Plain;
            // 
            // 
            // 
            // 
            // 
            // 
            this.tChart1.Legend.Title.Font.Bold = true;
            // 
            // 
            // 
            this.tChart1.Legend.Title.Pen.Visible = false;
            this.tChart1.Legend.Visible = false;
            this.tChart1.Location = new System.Drawing.Point(0, 0);
            this.tChart1.Name = "tChart1";
            // 
            // 
            // 
            // 
            // 
            // 
            this.tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(236)))), ((int)(((byte)(233)))), ((int)(((byte)(216)))));
            // 
            // 
            // 
            this.tChart1.Panel.ImageBevel.Width = 1;
            this.tChart1.Panel.MarginBottom = 25;
            this.tChart1.Panel.MarginLeft = 10;
            this.tChart1.Panel.MarginRight = 10;
            this.tChart1.Panel.MarginTop = 0;
            this.tChart1.Panel.MarginUnits = Steema.TeeChart.PanelMarginUnits.Pixels;
            // 
            // 
            // 
            this.tChart1.Panning.Allow = Steema.TeeChart.ScrollModes.None;
            this.tChart1.Series.Add(this.lineAct);
            this.tChart1.Size = new System.Drawing.Size(1016, 553);
            // 
            // 
            // 
            // 
            // 
            // 
            this.tChart1.SubFooter.Font.Bold = true;
            // 
            // 
            // 
            this.tChart1.SubFooter.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.tChart1.SubFooter.Font.Name = "Microsoft Sans Serif";
            this.tChart1.SubFooter.Font.Size = 9;
            this.tChart1.SubFooter.Font.SizeFloat = 9F;
            this.tChart1.SubFooter.Lines = new string[] {
        "Дата полета ММ.ГГ (№ вылета)"};
            this.tChart1.SubFooter.Visible = false;
            // 
            // 
            // 
            // 
            // 
            // 
            this.tChart1.SubHeader.Font.Bold = true;
            // 
            // 
            // 
            this.tChart1.SubHeader.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.tChart1.SubHeader.Font.Name = "Microsoft Sans Serif";
            this.tChart1.SubHeader.Font.Size = 11;
            this.tChart1.SubHeader.Font.SizeFloat = 11F;
            this.tChart1.SubHeader.Lines = new string[] {
        "двигатель. Заводской номер №",
        "Среднее изменение вибрации на МГ на земле",
        ""};
            this.tChart1.SubHeader.Visible = false;
            this.tChart1.TabIndex = 9;
            this.tChart1.Tools.Add(this.annotBottom);
            this.tChart1.Tools.Add(this.dragMarks1);
            // 
            // 
            // 
            // 
            // 
            // 
            this.tChart1.Walls.Back.AutoHide = false;
            // 
            // 
            // 
            this.tChart1.Walls.Bottom.AutoHide = false;
            // 
            // 
            // 
            this.tChart1.Walls.Left.AutoHide = false;
            // 
            // 
            // 
            this.tChart1.Walls.Right.AutoHide = false;
            // 
            // 
            // 
            this.tChart1.Zoom.Animated = true;
            this.tChart1.Zoom.Direction = Steema.TeeChart.ZoomDirections.Horizontal;
            // 
            // lineAct
            // 
            // 
            // 
            // 
            this.lineAct.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
            this.lineAct.ClickableLine = false;
            this.lineAct.ColorEach = true;
            // 
            // 
            // 
            this.lineAct.LinePen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(0)))), ((int)(((byte)(77)))), ((int)(((byte)(0)))));
            // 
            // 
            // 
            // 
            // 
            // 
            this.lineAct.Marks.Callout.ArrowHead = Steema.TeeChart.Styles.ArrowHeadStyles.None;
            this.lineAct.Marks.Callout.ArrowHeadSize = 8;
            // 
            // 
            // 
            this.lineAct.Marks.Callout.Brush.Color = System.Drawing.Color.Black;
            this.lineAct.Marks.Callout.Distance = 0;
            this.lineAct.Marks.Callout.Draw3D = false;
            this.lineAct.Marks.Callout.Length = 10;
            this.lineAct.Marks.Callout.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle;
            // 
            // 
            // 
            this.lineAct.Marks.Shadow.Visible = true;
            // 
            // 
            // 
            // 
            // 
            // 
            this.lineAct.Marks.Symbol.Shadow.Visible = true;
            this.lineAct.Marks.Visible = true;
            // 
            // 
            // 
            // 
            // 
            // 
            this.lineAct.Pointer.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.lineAct.Pointer.HorizSize = 3;
            this.lineAct.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle;
            this.lineAct.Pointer.VertSize = 3;
            this.lineAct.Pointer.Visible = true;
            this.lineAct.Title = "lineAct";
            // 
            // 
            // 
            this.lineAct.XValues.DataMember = "X";
            this.lineAct.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            // 
            // 
            // 
            this.lineAct.YValues.DataMember = "Y";
            // 
            // annotBottom
            // 
            this.annotBottom.Active = false;
            this.annotBottom.Cursor = System.Windows.Forms.Cursors.Default;
            this.annotBottom.Height = 16;
            this.annotBottom.Left = 60;
            // 
            // 
            // 
            this.annotBottom.Shape.Bottom = 24;
            this.annotBottom.Shape.CustomPosition = true;
            // 
            // 
            // 
            this.annotBottom.Shape.Font.Bold = true;
            this.annotBottom.Shape.Font.Name = "Microsoft Sans Serif";
            this.annotBottom.Shape.Font.Size = 9;
            this.annotBottom.Shape.Font.SizeFloat = 9F;
            this.annotBottom.Shape.Left = 60;
            this.annotBottom.Shape.Lines = new string[] {
        "111"};
            this.annotBottom.Shape.Right = 97;
            // 
            // 
            // 
            this.annotBottom.Shape.Shadow.Visible = true;
            this.annotBottom.Shape.Top = 8;
            this.annotBottom.Shape.Transparent = true;
            this.annotBottom.Text = "111";
            this.annotBottom.Top = 8;
            this.annotBottom.Width = 37;
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.AutoScroll = true;
            this.ClientSize = new System.Drawing.Size(1016, 553);
            this.Controls.Add(this.tChart1);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.button2);
            this.Controls.Add(this.button3);
            this.Controls.Add(this.dataGridView1);
            this.KeyPreview = true;
            this.Name = "Form1";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.DataGridView dataGridView1;
        private System.Windows.Forms.ToolTip toolTip1;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.Button button3;
        private Steema.TeeChart.Styles.Line lineAct;
        private Steema.TeeChart.TChart tChart1;
        private System.Windows.Forms.PrintPreviewDialog printPreviewDialog1;
        private System.Drawing.Printing.PrintDocument printDocument1;
        private System.Windows.Forms.PrintDialog printDialog1;
        private System.Windows.Forms.FontDialog fontDialog1;
        private System.Windows.Forms.PageSetupDialog pageSetupDialog1;
        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
        private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
        private Steema.TeeChart.Tools.Annotation annotBottom;
        private System.Windows.Forms.SaveFileDialog saveFileDialog1;
        private Steema.TeeChart.Tools.DragMarks dragMarks1;
    }
}

Code: Select all

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            lineAct.FillSampleValues();
        }
    }
}
The code above makes cursor NEVER become arrow type after once becoming hand (but dragMarks tool still working).
I've tested many possibilities and found out that making annotation unavailable or deleting it solves the problem.

P.S. I use teeChart 2.0.3203.23272
P.S. By the way in old versions (2.0.2652.22325 for example) this piece of code makes cursor NEVER become hand type :)

So what can you say about it?
Thank you.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 22, 2009 10:33 am

Hi bairog,

Thanks for the information. This already works fine using latest TeeChart for .NET v3 release. I'll add this to the bug list for v2. However, v3 was published on mid-2007 so it's unlikely that this gets fixed in v2.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply