Page 1 of 1

Drawing a backgroud

Posted: Mon Feb 13, 2006 5:41 pm
by 9637927
Hello.
There are 2 questions:
1. If we set Drawing.ImageMode = normal then Tchart.Walls.Back picture isn't drawn at all! Why?
2. How can we draw a picture that fills exactly back part of the Tchart( starting X=0, Y=0 )?
Tchart.Walls.Back is really drawn from X=0, Y=0 BUT left and bottom part of a picture is trimmed.
Are there any solutions to the problems?

Thanks!

Posted: Tue Feb 14, 2006 9:23 am
by narcis
Hello,

Please find below the answers to your questions:

1. I'm not able to reproduce the problem here. Which TeeChart version are you using? Could you please send some code or an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

2. You can try using:

Code: Select all

	tChart1.Panel.ImageMode=Steema.TeeChart.Drawing.ImageMode.Stretch;

Posted: Wed Feb 15, 2006 4:31 pm
by 9637927
Just added the example.
Subject of the post: "Tchart problems."

Thanks.

Posted: Thu Feb 16, 2006 2:55 pm
by narcis
Hi vadimm,

Thanks for the example. This is certainly a defect and already added it to our bug list (TF02011257) to be fixed for future releases. In the meantime, you'll have to use TeeChart's panel image as shown here:

Code: Select all

        public void Draw(Steema.TeeChart.Drawing.ImageMode Mode,bool with3D)
        {
            Steema.TeeChart.TChart Handle = new Steema.TeeChart.TChart();
            Handle.Axes.Left.AxisPen.Color = System.Drawing.Color.Red;
            Handle.Axes.Bottom.AxisPen.Color = System.Drawing.Color.Red;
            Handle.Axes.Right.AxisPen.Color = System.Drawing.Color.Red;
                        
            Handle.Legend.Visible = false;

            //
            Handle.Aspect.View3D = with3D;
            //

			Handle.Panel.Image = System.Drawing.Image.FromFile("image.bmp");
			Handle.Panel.ImageTransparent = false;
			Handle.Panel.Visible = true;
			Handle.Panel.Transparent = false;
			Handle.Panel.ImageMode = Mode;
            
            Handle.Dock = System.Windows.Forms.DockStyle.Fill;

            this.Controls.Add(Handle);
            this.Show();
        }