TAnnotationTool disappears

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
bdw
Advanced
Posts: 130
Joined: Mon Mar 07, 2005 5:00 am
Location: New Zealand
Contact:

TAnnotationTool disappears

Post by bdw » Thu Oct 31, 2013 6:22 am

Hi,
I must be missing something obvious here. This used to work so not sure what I'm doing wrong.

I create a TAnnotationTool in the FormShow() and then update it from a OnTimer() event. When I update it in the OnTimer it disappears ?

Code looks like this :-

void __fastcall TForm1::FormShow(TObject *Sender) {
chartAnno = new TAnnotationTool(Chart1);
chartAnno->ParentChart = Chart1;
chartAnno->PositionUnits = muPercent;
chartAnno->Shape->Left = 50;
chartAnno->Shape->Top = 50;
chartAnno->Shape->Transparent = true;
chartAnno->Text = "Did this work";
}
void __fastcall TForm1::Timer1Timer(TObject *Sender) {
chartAnno->Text = "why";
}

bdw
Advanced
Posts: 130
Joined: Mon Mar 07, 2005 5:00 am
Location: New Zealand
Contact:

Re: TAnnotationTool disappears

Post by bdw » Thu Oct 31, 2013 6:33 am

I also tried adding Chart1->Tools->Add(chartAnno); turning off GDI+ and a number of other things but no luck.

I'm using the Beta 2013_130920

bdw
Advanced
Posts: 130
Joined: Mon Mar 07, 2005 5:00 am
Location: New Zealand
Contact:

Re: TAnnotationTool disappears

Post by bdw » Thu Oct 31, 2013 6:35 am

Actually just added the following to the Timer1Timer() :=

void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
chartAnno->Text = "why";
chartAnno->Shape->Left = 50;
chartAnno->Shape->Top = 50;
}

and it is drawn correctly. Is there a reason for this ?

bdw
Advanced
Posts: 130
Joined: Mon Mar 07, 2005 5:00 am
Location: New Zealand
Contact:

Re: TAnnotationTool disappears

Post by bdw » Thu Oct 31, 2013 6:52 am

Just to follow on from this, however if I had a second TAnnotationTool and change this values text in the OnTimer() the other TAnnotationTool value text disappears.

arrghh.

bdw
Advanced
Posts: 130
Joined: Mon Mar 07, 2005 5:00 am
Location: New Zealand
Contact:

Re: TAnnotationTool disappears

Post by bdw » Sun Nov 03, 2013 6:35 am

I have found the issue is muPercent.

If I change that to pixels and set the % values myself it draws correctly.

Looks like a bug to do with muPercent.

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

Re: TAnnotationTool disappears

Post by Narcís » Tue Nov 05, 2013 12:48 pm

Hello,

Thanks for your feedback. I have added the issue to bugzilla to be fixed for future releases.
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