Page 1 of 1

Delphi won't Find a component

Posted: Mon Sep 03, 2012 7:32 pm
by 16462785
Hi Yeray,

I'm having problem with the findcomponent method for TChartAxis. I've seen in the documentation that there's not such a method for this type.

This is the command line I'm using to access the component dynamically:
TChartAxis(FindComponent(Eixo)).AutomaticMaximum := false;

At runtime, Delphi don't find the component named Eixo, that's passed as string and the content of Eixo is declared as TCharAxis. The compiler don't give an error.

Is there any other way to access it dynamically?

Thanks and best regards.


Ricardo Mayer de Aquino

Re: Delphi won't Find a component

Posted: Tue Sep 04, 2012 10:17 am
by yeray
Hello Ricardo,

Can I ask in what situation you may know the name of a TChartAxis and not the object itself?
Normally you access the axes through Chart1.Axes.Bottom or Chart1.Axes.Left. Or if it's a custom axis: Chart1.CustomAxes.

Re: Delphi won't Find a component

Posted: Fri Sep 07, 2012 12:04 am
by 16462785
Hi Yeray, thank you for your answer. It was a silly question that I made.
Best regards.
Ricardo