Page 1 of 1

Resize Rectangle Tool

Posted: Wed Oct 29, 2014 11:57 am
by 9526439
Hi Steema Support,
When we resizes the application window then teechart manages appearance of all the series, legend ,ticks etc. according to window size or we can say it manage its GUI as screen resolution. But when we use Rectangle tool in teechart and resizes the application window, whole graph maintains its GUI except Rectangle tool i.e. on resizing the application window Rectangle tool size and its text does not grows and shrinks as per screen resolution of application window.
As shown in fig.
when application window is maximized.
img1.png
Image1
img1.png (46.62 KiB) Viewed 4562 times
When application window is resized : In this case application window size is small then rectangle tool covers its whole plot as shown in fig. We want to resize(rectangle tool and its text) as application window size.
img2.png
Image2
img2.png (25.19 KiB) Viewed 4559 times
It will so helpful for us if you please provide any alternative solution.

Thanks in advance.


Thanks and Regards
Plano research

Re: Resize Rectangle Tool

Posted: Thu Oct 30, 2014 9:52 am
by Christopher
Have you tried changing the font size in the resize event, e.g.

Code: Select all

    RectangleTool tool;
    private void InitializeChart()
    {
      tChart1.Series.Add(typeof(Line)).FillSampleValues();

      tool = new RectangleTool(tChart1.Chart);
      tool.Shape.Transparency = 0;
      tool.Text = "This is" + Utils.NewLine + "some example" + Utils.NewLine + "multiline text";
      tool.Left = 200;
      tool.Top = 150;
      tool.AutoSize = true;

      tChart1.Resize += tChart1_Resize;
    }

    void tChart1_Resize(object sender, EventArgs e)
    {
      tool.Shape.Font.Size = 4;
    }