Page 1 of 1

Borland C++ Builder to .NET transition help

Posted: Fri Aug 10, 2007 4:36 pm
by 14046227
We are currently porting one of our Borland C++ Builder apps to .NET/WinForms, and I am a little confused about some of the property mappings. Please understand, I am not a Borland programmer, so some things are a bit confusing to me.

First and foremost is the bsClear and bsSolid brush style options provided by Borland. How do I reproduce those effects using the .NET TeeChart? The HatchStyle enumeration provided by System.Drawing doesn't contain Clear or Solid. Should I use the Transparency and Solid properties of the ChartBrush class? If so, what do both of those enums represent in terms of those values? I would think bsSolid = { Solid = true; Transparency = 100; } and bsClear = { Solid = True; Transparency = 0; }, but I am simply not sure.

Any help would be appreciated.

Posted: Mon Aug 13, 2007 8:03 am
by narcis
Hi MattHolmes,

Yes, you should use Solid and Transparency properties.

bsClear: Any brush style but Transparency=100.
bsSolid: Solid=true and Transparency=0.

Posted: Mon Aug 13, 2007 2:57 pm
by 14046227
Great, thanks!

One question. What would considered the "default" HatchStyle? I am using HatchStyle.Max currently, but MS's docs on Drawing2D are a bit lacking.

Posted: Mon Aug 13, 2007 3:07 pm
by narcis
Hi MattHolmes,

Yes, I've also had this problem with Microsoft's documentation. However I'd say the default value is BackwardDiagonal as looking at some brushes says so, for example:

Code: Select all

			Text = tChart1.Panel.Brush.Style.ToString();