FMX Textout example?

TeeChart FireMonkey (Windows,OSX,iOS & Android) for Embarcadero RAD Studio, Delphi and C++ Builder (XE5+)
Post Reply
WCantrall
Newbie
Newbie
Posts: 27
Joined: Mon May 03, 2004 4:00 am
Location: USA
Contact:

FMX Textout example?

Post by WCantrall » Fri Oct 27, 2017 10:17 pm

I have tried and not found any examples of using a simple textout to the FMX tchart.
i have just tried a simple example of a tchart and a button

Code: Select all

procedure TForm2.Button1Click(Sender: TObject);
begin
       Chart1.Canvas.AssignFont(Arial);
       Chart1.Canvas.TextOut(20,20,'hello');
end;
with no luck. A working example would be very much appreciated.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: FMX Textout example?

Post by Yeray » Tue Oct 31, 2017 8:55 am

Hello,

Custom drawing functions usually require to be called in a drawing event such as OnAfterDraw. Ie:

Code: Select all

procedure TForm1.Chart1AfterDraw(Sender: TObject);
begin
  Chart1.Canvas.TextOut(20,20,'hello');
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply