自從 XE8 提供 ImageList 帶來了很多便利,但 SpeedButton 的圖標太小(不夠大氣),還好 FMX 提供了 Style 可供使用者自訂圖標大小及顯示位置,請自行按圖索驥,做一遍:
- 開一個新工程。
- 放一個 SpeedButton。
- 放一個 ImageList。
- 在 ImageList1 點二下,加入一些圖標。
- 設定 SpeedButton 的 Images 及 ImageIndex (見下圖):
- 在 SpeedButton 按鼠標右鍵,選 "Edit Default Style..."
(要改 Default Style,這樣在新加入的 SpeedButton 全部會采用這個 Style)
- 展開 Style 設定下面所示的屬性:
- 設定 SpeedButton 的大小及圖標(因為改的是 Default Style 所以新加入的 SpeedButton 全部會采用這個 Style)
- 真機運行效果: