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.
BorderRound and the corner color
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:
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;
}
Pep Jorge
http://support.steema.com
http://support.steema.com
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...
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; }
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
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!
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!
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi --
I believe I responded to your mail on the newsgroups. Here's my answer:
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.
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/