'Change the font colour of combo box in delphi firemonkey mobile

I have created application using Delphi XE7 firemonkey for Android mobile. In that i'm using Combobox. How can I change the font colour of the combo box?



Solution 1:[1]

ComboBox1.ListBox.ListItems[0].TextSettings.FontColor := TAlphaColorRec.White;
  ComboBox1.ListBox.ListItems[0].StyledSettings := ComboBox1.ListBox.ListItems[0].StyledSettings
- [TStyledSetting.ssFontColor];

The above code is working fine for changing the font color of the first item in the combo box "ComboBox1" in a firemonkey application.

Solution 2:[2]

I tried this code:

  for i := 0 to Combobox1.Count -1 do
  begin
    ComboBox1.ListItems[i].Text := ' Hello';
    ComboBox1.ListItems[i].Font.Style := [TFontStyle.fsBold];
    ComboBox1.ListItems[i].Font.Size := 26;
    ComboBox1.ListItems[i].StyledSettings := [];
    ComboBox1.ListItems[i].Height := 30;
  end;

But it really works after I changed the property from ComboBox: DropDownKind = Native to Custom

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Danilo Casa
Solution 2 Wellington Telles Cunha