Delphi Haven – So… I’m working on a little custom FireMonkey control. As in the VCL, if you want to handle drawing a custom control yourself, you need to override its Paint method. In my case the override was looking like this: procedure TMyChildControl.Paint; begin if (Parent <> nil) and (Parent.Parent is TMyOtherControl) then Canvas.Font.Assign(TMyOtherControl(Parent.Parent).Font); Canvas.FillText(LocalRect, SomeText, False, 1, , TTextAlign.taCenter); end; If you’re wondering, this was partly a workaround for the fact FMX doesn’t have a ‘parent font’ ...
Visits by Source
Users who voted for this posting