Annotation exceptions

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
fano
Newbie
Newbie
Posts: 56
Joined: Wed Jun 22, 2005 4:00 am
Location: USA, California

Annotation exceptions

Post by fano » Mon Jun 05, 2006 8:54 pm

Hi
When using annotations I find usaully always problems:
For example:
Use the Tools collection editor to add an annotation tool and
edit its name and then click 'ok'. -> it crashes with a System.NullReferenceException.
For example:
Add an annotation via the 'Edit' from the right click menu. Then
upon Initializing your form you set:

annotation.Active = false
In a button or some other UI element at a handler that sets:
annotation.Active = false
annotation.Shape.Transparency = 80;

Lauch application then click the button -> crash with null reference exception

For the latter one is there a work-around?
I'd like the annotation to be invisible at first and then
make it visible and set the transparency as shown above.
Thanks.
fano

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 Jun 06, 2006 11:17 am

Hi fano,
Use the Tools collection editor to add an annotation tool and
edit its name and then click 'ok'. -> it crashes with a System.NullReferenceException.


I can not reproduce it here, annotation name can not be edited. Are there any specific steps we could follow to reproduce the problem here?
For example:
Add an annotation via the 'Edit' from the right click menu. Then
upon Initializing your form you set:

annotation.Active = false
In a button or some other UI element at a handler that sets:
annotation.Active = false
annotation.Shape.Transparency = 80;

Lauch application then click the button -> crash with null reference exception

For the latter one is there a work-around?
I'd like the annotation to be invisible at first and then
make it visible and set the transparency as shown above.
Yes, you can use:

Code: Select all

annotation1.Shape.Brush.Transparency = 80;
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

fano
Newbie
Newbie
Posts: 56
Joined: Wed Jun 22, 2005 4:00 am
Location: USA, California

reporducing the exception upon changing the name of the anno

Post by fano » Tue Jun 06, 2006 2:56 pm

Hi,

to reproduce the exception for annotation name property change:

1. In design mode click on the tchart and then loock at its
properties in the .NET solution explorer (click the properties tab)
2. Click on the 'Tool' property which will bring up the collection editor for all
the tools in the chart
3. Add an annotation and look at the 'Name' property shown in
that collection editor.
4. Change the name property (it is editable as is should be) and click the 'OK'
button
5 Exception happens and your form/dialog will reflect that clearly.

Thanks for the hint with the annotation.Shape.Brush.Transparency workaround. It works.
fano

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 Jun 06, 2006 4:33 pm

Hi fano,
to reproduce the exception for annotation name property change:

1. In design mode click on the tchart and then loock at its
properties in the .NET solution explorer (click the properties tab)
2. Click on the 'Tool' property which will bring up the collection editor for all
the tools in the chart
3. Add an annotation and look at the 'Name' property shown in
that collection editor.
4. Change the name property (it is editable as is should be) and click the 'OK'
button
5 Exception happens and your form/dialog will reflect that clearly.
Thanks for the information. I could reproduce the problem and I've added it to our wish-list to be enhanced for future releases.
Thanks for the hint with the annotation.Shape.Brush.Transparency workaround. It works.
This has already been fixed so you'll be able to use what you originally intended in the next release.
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

Post Reply