Question about shadow editor
Posted: Mon Aug 02, 2010 8:56 am
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:
The shadow is drawn by this code:
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: Now I change the Horizontal distance to 10 by means of the numedit, the shadow is not more drawn: After changing the color trackbar a bit I get the shadow with the new settings applied: 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
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)
Code: Select all
Dim shad As Drawing.Shadow = chart1.Legend.Shadow
shad.Draw(g, New Rectangle(.Left, .Top, .Width, .Height), .RectangleRadius, 0, 0)
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: Now I change the Horizontal distance to 10 by means of the numedit, the shadow is not more drawn: After changing the color trackbar a bit I get the shadow with the new settings applied: 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