Page 1 of 1

get the double click on Rectangle tool

Posted: Thu Mar 20, 2014 1:19 pm
by 9641422
Hi Steema Support,
How can get the double click on Rectangle tool as shown in fig.
aa.jpg
aa.jpg (60.38 KiB) Viewed 5568 times

When we double click on Rectangle Tool it Should raise a Message showing that Mouse double clicked on Rectangle Tool.
It will so helpful for us if you please provide any alternative solution.

Thanks in advance.


Thanks and Regards
Planoresearch

Re: get the double click on Rectangle tool

Posted: Fri Mar 21, 2014 1:33 pm
by Christopher
Hello Amol,
Amol wrote:When we double click on Rectangle Tool it Should raise a Message showing that Mouse double clicked on Rectangle Tool.
It will so helpful for us if you please provide any alternative solution.
You could try something similar to:

Code: Select all

    RectangleTool tool;

    private void InitializeChart()
    {
      tool = new RectangleTool(tChart1.Chart);
      tool.Text = "Hello!";
      tool.Shape.Transparency = 0;

      tChart1.MouseDoubleClick += tChart1_MouseDoubleClick;
    }

    void tChart1_MouseDoubleClick(object sender, MouseEventArgs e)
    {
      MessageBox.Show(tool.Bounds.Contains(e.Location).ToString());
    }