标签:
在 FMX 下的 TComboBox 下拉菜单字型修改有二种方法:
procedure TForm1.FormCreate(Sender: TObject); var i: Integer; begin ComboBox2.DropDownKind := TDropDownKind.Custom; Combobox2.ListBox.DefaultItemStyles.ItemStyle := ‘listboxitemstyle1‘; end;
procedure TForm1.FormCreate(Sender: TObject); var i: Integer; begin ComboBox2.DropDownKind := TDropDownKind.Custom; for i:=0 to ComboBox2.Count - 1 do begin ComboBox2.ListBox.ListItems[i].StyledSettings := ComboBox2.ListBox.ListItems[i].StyledSettings - [TStyledSetting.Family, TStyledSetting.Size, TStyledSetting.FontColor]; ComboBox2.ListBox.ListItems[i].TextSettings.Font.Size := 16; ComboBox2.ListBox.ListItems[i].TextSettings.FontColor := claRed; ComboBox2.ListBox.ListItems[i].TextSettings.Font.Family := ‘字型名称‘; ComboBox2.ListBox.ListItems[i].Height := 22; end; end;
效果示例:
Firemonkey TComboBox 下拉菜单字型修改方法 (D10)
标签:
原文地址:http://www.cnblogs.com/onechen/p/5108014.html