Page 1 of 1

AreaChartBrush not returning what I set it to

Posted: Tue Jun 05, 2007 6:42 pm
by 9531332
AreaChartBrush doesn't seem to properly return the correct brush style when you set it to certain styles

The following code demonstrates the problem:

Code: Select all

Private Sub Form_Load()
    TChart1.AddSeries scArea
    TChart1.Series(0).asArea.AreaChartBrush.Style = bsCrossSmall
    If TChart1.Series(0).asArea.AreaChartBrush.Style = bsCrossSmall Then
        MsgBox "It Worked!"
    Else
        MsgBox "Uh-oh"
    End If
End Sub
If there a way to get back the value that I put in AreaChartBrush?

Posted: Wed Jun 06, 2007 8:19 am
by yeray
Hi thatnerdyguy,

We could reproduce the issue here and this seems to be a bug. We've added it (TA05012240) to our defect list to be fixed for future releases.

We can say by now which styles work well and which not:

NOT WORKING
bsBackCrossSmall
bsBackDiagSmall
bsCrossSmall
bsDiagSmall
bsFill10
bsFill20
bsFill40
bsFill60
bsFill80
bsHorizSmall
bsVertSmall
bsZigZag

WORKING
bsClear
bsCross
bsDiagCross
bsFDiagonal
bsBDiagonal
bsHorizontal
bsVertical
bsSolid

Thanks for reporting this.

Posted: Fri Jun 22, 2007 5:22 pm
by Pep
Hi,

about this issue, let you know that this is as designed, as brush styles different of (bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross) are not a standard brush styles they cannot return a correct index nor change its pen color for example.

These brush styles are applied by loading a custom image into the IBrush.

I'm afraid we cannot control the index ( return anyone ) when brush style applied is not a standard brush.