Pointer
Pointer

Reputation: 2186

Delphi TComboBox disable highlight (focused)

After open form item in TCombobox is highlighted (Blue backgrond on text).

Is it possible disable that.

enter image description here

Tnx all!

Upvotes: 1

Views: 1296

Answers (1)

Loi
Loi

Reputation: 96

You can put this message into OnEnter event of TCombobox object:

// Suppose the combobox control name is ComboBox
procedure TMainForm.ComboBoxEnter(Sender: TObject);
begin
  PostMessage(ComboBox.Handle, CB_SETEDITSEL, Cardinal(-1), 0);
end;

Upvotes: 6

Related Questions