Question about shadow editor

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Uli
Newbie
Newbie
Posts: 80
Joined: Thu Apr 22, 2010 12:00 am

Question about shadow editor

Post by Uli » 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:

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 6914 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 6915 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 6916 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

Uli
Newbie
Newbie
Posts: 80
Joined: Thu Apr 22, 2010 12:00 am

Re: Question about shadow editor

Post by Uli » Mon Aug 02, 2010 12:44 pm

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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Question about shadow editor

Post by Sandra » Tue Aug 03, 2010 11:45 am

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply