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";
}
TAnnotationTool disappears
Re: TAnnotationTool disappears
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
I'm using the Beta 2013_130920
Re: TAnnotationTool disappears
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 ?
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 ?
Re: TAnnotationTool disappears
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.
arrghh.
Re: TAnnotationTool disappears
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.
If I change that to pixels and set the % values myself it draws correctly.
Looks like a bug to do with muPercent.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: TAnnotationTool disappears
Hello,
Thanks for your feedback. I have added the issue to bugzilla to be fixed for future releases.
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 |
Instructions - How to post in this forum |