FMX Textout example?

TeeChart FireMonkey (Windows,OSX,iOS & Android) for Embarcadero RAD Studio, Delphi and C++ Builder (XE5+)

FMX Textout example?

Postby 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.
WCantrall
Newbie
Newbie
 
Posts: 26
Joined: Mon May 03, 2004 4:00 am
Location: USA

Re: FMX Textout example?

Postby 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 ImagePlease read our Bug Fixing Policy
Yeray
Site Admin
Site Admin
 
Posts: 8158
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia


Return to FMX

Who is online

Users browsing this forum: No registered users and 2 guests

cron