MaxLabelsWidth + error message "Invalid parameter used&

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
ACTL
Newbie
Newbie
Posts: 14
Joined: Thu Sep 30, 2004 4:00 am

MaxLabelsWidth + error message "Invalid parameter used&

Post by ACTL » Mon Dec 19, 2005 7:54 pm

Hi,

I created this simple projet to explain the problem:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TChart1.Aspect.View3D = False
TChart1.Panel.Gradient.Visible = True
TChart1.Header.Text = "TeeChart Multiple Axes"
TChart1.Series.Add(Line1)
For t As Integer = 0 To 10
Line1.Add(Convert.ToDouble(t), Convert.ToDouble(10 + t), Color.Red)
Next

Dim test As Integer = TChart1.Axes.Left.MaxLabelsWidth()
End Sub

When I click on the Button I receive the error message "Invalid parameter used" when the code use the "MaxLabelsWidth" function.
I receive this error not all the time (4/5 times).
Can you tel me what's wrong.

I use Visual Basic Dot Net version 7.1.3088.
The TeeChart dot net version is 2.0.2040.15118

Thanks in advance for your help.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Dec 20, 2005 12:36 pm

Hi ACTL,

Have you tried retrieving this value on TChart's AfterDraw event? Using it as you do it may fail because the axes labels hasn't been drawn yet so that this value hasn't been initialized.
Best Regards,
Narcís Calvet / 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

ACTL
Newbie
Newbie
Posts: 14
Joined: Thu Sep 30, 2004 4:00 am

Post by ACTL » Tue Dec 20, 2005 12:58 pm

Thank you Nancy.
You are right.

Best regards.

Post Reply