Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   TComboBox FMX unter Android: Font size? (https://www.delphipraxis.net/206650-tcombobox-fmx-unter-android-font-size.html)

weber8722 14. Jan 2021 17:18

TComboBox FMX unter Android: Font size?
 
Hallo,

ich kann zwar die Comboxbox leicht einstellen, aber wenn ich dann klicke und eine Auswahl treffen, dieser Font ist dann irgendwie fix, er wird z.B. mit Scale=0.8 nicht auch verkleinert. Und auch Fontsize scheint keinen Einfluss zu haben. Hat jemand ein Lösung?

Ciao Stephan

philipp.hofmann 14. Jan 2021 19:22

AW: TComboBox FMX unter Android: Font size?
 
Müsst in etwa so gehen:

Delphi-Quellcode:
procedure doSizeComboBoxItems(ComboBox:TComboBox; Size:Single);
var
  Item : TListBoxItem;
  i : Integer;
begin
  for i:=0 to ComboBox.Count-1 do
  begin
    Item:=ComboBox.ListItems[i];
    Item.Font.Size := size;
    Item.StyledSettings := Item.StyledSettings - [TStyledSetting.Size];
  end;
end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:24 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz