[Info] Problems with FMX TSpeedButtons in Delphi 13.1

Demos, code samples. Only questions related to the existing topics are allowed here.
Post Reply
Sergey Tkachenko
Site Admin
Posts: 18253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

[Info] Problems with FMX TSpeedButtons in Delphi 13.1

Post by Sergey Tkachenko »

You may notice that buttons in some FireMonkey demo projects look unusual: in addition to images from a TImageList, a flag icon is displayed on top of them.

This is caused by a bug in Delphi 13.1. Normally, the predefined button icons should be hidden when an image from a TImageList is assigned to the button.

This bug has been reported to Embarcadero, and hopefully it will be fixed in a future update.

As a workaround, you can use the code shown below. Assign the OnApplyStyleLookup event handler to all buttons that use images from a TImageList:

Code: Select all

procedure TfrmMain.btnApplyStyleLookup(Sender: TObject);
var
  Ico: TControl;
begin
  if (Sender as TStyledControl).FindStyleResource<TControl>('icon', Ico) then
    Ico.Visible := False;
end;
The FMX Editor 2 demo, compiled in Delphi XE8
ButtonsXE8.png
ButtonsXE8.png (8.15 KiB) Viewed 10498 times
The same demo, compiled in Delphi 13.1 (without the workaround)
Buttons13.1.png
Buttons13.1.png (9.43 KiB) Viewed 10498 times
fatih
Posts: 17
Joined: Sun May 11, 2025 3:22 pm

Re: [Info] Problems with FMX TSpeedButtons in Delphi 13.1

Post by fatih »

It really fixed, thank you. I was just about to write this question.
Sergey Tkachenko
Site Admin
Posts: 18253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: [Info] Problems with FMX TSpeedButtons in Delphi 13.1

Post by Sergey Tkachenko »

This problem was fixed in Delphi 13.2.
So, if you upgrade from Delphi 13.1 to 13.2, this workaround is no longer needed.
Post Reply