3
votes

I'm trying to change the font size of a combobox in Delphi Firemonkey XE7. The application will be used on a Windows tablet. It already works so far that the selected item shown in the combobox when "not opened" changes the font size but when I click on the combobox and the drop-down-menu opens, the items in the drop-down-menu have still the default font size. Does anyone know how to fix this?

The source code so far:

for i := 0 to combobox1.Count - 1 do
begin
  combobox1.ListBox.ListItems[i].TextSettings.Font.Size := 20;
  combobox1.ListBox.ListItems[i].StyledSettings :=  combobox1.ListBox.ListItems[i].StyledSettings - [TStyledSetting.Size];
end;

Click here to view picture of the described problem.

Thanks in advance! Lea

1
If you use the Scale property on the combobox it will change the text size of both the box item and the drop down items.Doug Rudd
do you have any code? what i read on the internet about the property seems that it just scales the drop-down-menu but not the font size but i have no idea if that's right and how to use this property :/Lea

1 Answers

3
votes

For use styled ListBox items in ComboBox, set ComboBox.DropDownKind := TDropDownKind.Custom