Page 1 of 1

Question about shadow editor

Posted: Mon Aug 02, 2010 8:56 am
by 15655996
Hi,

I paint a custom legend in the chart_afterdraw event. So the regular legend.visible property is set to false. Border and gradient editors for this custom legend work well.

The shadow editor was constructed by this code in the load event of my custom legend editor:

Code: Select all

Dim Shad As New Editors.ShadowEditor(MyChart.Legend.Shadow, GroupBox5)
The shadow is drawn by this code:

Code: Select all

            Dim shad As Drawing.Shadow = chart1.Legend.Shadow
            shad.Draw(g, New Rectangle(.Left, .Top, .Width, .Height), .RectangleRadius, 0, 0)
The normal Legend.shadow property shall serve as buffer. With my custom legends gradient it works fine.
The chart is in a mdi childwindow. When I execute my custom chart editor (with showdialog) I run into two problems:

1. While the custom chart editor is visible:
Settings will only applied when I change the shadow color by means of the trackbar. After doing so I get the following image:
leg1.JPG
leg1.JPG (83.38 KiB) Viewed 6751 times
Now I change the Horizontal distance to 10 by means of the numedit, the shadow is not more drawn:
leg2.JPG
leg2.JPG (87.09 KiB) Viewed 6752 times
After changing the color trackbar a bit I get the shadow with the new settings applied:
leg3.JPG
leg3.JPG (85.3 KiB) Viewed 6753 times
2. That's the biggest problem: After closing my custom legend editor the shadow disappers. (same as leg2.jpg)

BTW: If using the regular chart editors legend shadow tab the same behavior occurs when I try to edit the regular legend.shadow property in this place.

What I'm doing wrong?

Regards

Uli

Re: Question about shadow editor

Posted: Mon Aug 02, 2010 12:44 pm
by 15655996
Hi,

I have solved the problem. I have to additionally define the g.brush before drawing the shadow.

But another question: With checked "Smooth" option the "Blur" trackbar seems to have no influence on the shadow appearance. Is it correct?

Regards

Uli

Re: Question about shadow editor

Posted: Tue Aug 03, 2010 11:45 am
by 10050769
Hello Uli,
But another question: With checked "Smooth" option the "Blur" trackbar seems to have no influence on the shadow appearance. Is it correct?
Yes, you're right. I have added it in bug list with number [TF02015072]. We will try to fix it for next versions of TeeChart.Net.

Thanks,