The Delphi TComboBox wrapper does not support an editable owner style, but the main Windows control does this and is easy to enable.
Create a new child class as follows:
TComboBox = class(StdCtrls.TComboBox) public procedure CreateParams(var Params: TCreateParams); override; end; procedure TComboBox.CreateParams(var Params: TCreateParams); begin inherited; if Assigned(OnDrawItem) then Params.Style := Params.Style or CBS_OWNERDRAWFIXED end;
Set Style to csDropDown and assign OnDrawItem , as you already did.
Zoë peterson
source share