As far i know, the only workaround for this issue, is ownerdraw the combobox
Try these steps
- Set the Style property of the combobox to
csOwnerDrawFixed
- In the OnDrawItem event use the vcl styes methods to draw the combobox items.
Check this sample code
uses
Vcl.Styles,
Vcl.Themes,
procedure TForm115.ComboBox1DrawItem(Control: TWinControl; Index: Integer;
const
ColorStates: array[Boolean] of TStyleColor = (scComboBoxDisabled, scComboBox);
FontColorStates: array[Boolean] of TStyleFont = (sfComboBoxItemDisabled, sfComboBoxItemNormal);
var
LStyles : TCustomStyleServices;
begin
LStyles :=StyleServices;
with Control as TComboBox do
begin
Canvas.Brush.Color := LStyles.GetStyleColor(ColorStates[Control.Enabled]);
Canvas.Font.Color := LStyles.GetStyleFontColor(FontColorStates[Control.Enabled]);
if odSelected in State then
Canvas.Brush.Color := LStyles.GetSystemColor(clHighlight);
Canvas.FillRect(Rect) ;
Canvas.TextOut(Rect.Left+2, Rect.Top, Items[Index]);
end;
end;
For more info you can check this article Vcl Styles and Owner Draw
. Also you can use the Vcl.Styles.OwnerDrawFix unit (part of the vcl-styles-utils project) which incudes a set of owner draws routines for components like TListBox, TComboBox and TListView.