Page 1 of 1

BorderRound and the corner color

Posted: Mon Jun 21, 2004 8:39 am
by 8125839
Greetings!

I'm using the splendid new function BorderRound in my ASP.NET solution.

But, I cannot find the property to set the color of the now visible corners of the grid. They seem to be of some standard ButtonFace color but I'm not sure. Anyway, they light up quite a lot on my webpage so I would really like to change that color.

Posted: Mon Jun 21, 2004 3:35 pm
by Pep
Hi,

a way to change the Border Color is to using the Bevels color but the problem is Bevels and RoundBorder don’t work together at the moment.

To change the color of the border use code similar to:

Code: Select all

private void Form1_Load(object sender, System.EventArgs e) { 
  ne1.FillSampleValues();
  is.BackColor = Color.Gainsboro;
  hart1.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
  hart1.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
  hart1.Panel.BorderRound = 50;
  hart1.Panel.Pen.Visible = true;
  hart1.Panel.Pen.Width = 2;
  hart1.Panel.Pen.Color = Color.Red;
}

Posted: Tue Jun 22, 2004 7:46 am
by 8125839
Greetings!

You are right. It they don't work together. In your example above you have BorderRound value of 50 which mean that the Pen.Width must be something like 40 to cover all of the visible corner. But by giving it this width the visible size of the graph panel shrinks and I have to compensate and add width to the TeeChart object. This is a bit tricky when you try to work with set sizes on a webpage.

Do you have any other suggestions?
Will the background (corner) color be available as a property in a future fix?

And another funny thing is that when I set the Pen.Color and the HTML BODY Background style to the same color they actually don't match. Almost, but not quite... :?

Code: Select all

MyChart.Panel.Pen.Color = System.Drawing.Color.FromArgb(119, 205, 178)

BODY { background-color: #77CDB2; }

Posted: Mon Jun 28, 2004 1:23 pm
by Chris
Hi ...

This issue is intriguing ... the BorderRound property is only implemented in the TChart class (the WinForm compatible class) and is not implemented in the Chart class on which the WebChart is based.

How, exactly, are you using BorderRound in an ASP.NET application? Would you be so kind as to post a WebForm I can run "as-is" to:
news://www.berneda.com/steema.public.attachments ?

Many thanks!

Posted: Fri Jul 02, 2004 8:05 am
by 8125839
I uploaded an example project with the same subject name as this thread a couple of days ago, but I have been unable to post here.

The code is quite simple actually.

Posted: Fri Jul 02, 2004 9:37 am
by Chris
Hi --

I believe I responded to your mail on the newsgroups. Here's my answer:
Hi Peter,

Thanks for the example. Please let me explain what's happening here.

The BorderRound property controls the painting of a Chart onto its parent
control. As you can see, BorderRound is accessed via the Panel property but
belongs to the Steema.TeeChart.Drawing.Shape class from which the Panel
class inherits. This is why the chart draws itself with rounded borders as a
WebChart or as an image.

The problem with the corners does not occurs in the TChart class (used on
WinForms) as this class inherits from the System.Windows.Forms.Control class
and this class has a Region property. In this way the BorderRound property
not only controls how the Chart is painted but also modifies the shape of
the underlying control itself so making the corners non-existent.

However, the problem with corners does occur in the WebChart as this class
inherits from the System.Web.UI.WebControls.WebControl class and this class
does not have a Region property. In the absence of a region property
BorderRound cannot modify the shape of the underlying control and hence the
corner problem occurs.

Maybe a CornerColor property is in order for the WebChart/Bitmap scenarios.
I'll add the idea to the wishlist.