TAnnotationTool disappears
Posted: 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";
}
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";
}