Mirror

How to specify a different width for the items list in a TComboBox (Views: 101)


Problem/Question/Abstract:

How to specify a different width for the items list in a TComboBox

Answer:

Send it the CB_SETDROPPEDWIDTH message with a new width.

procedure TForm1.Button1Click(Sender: TObject);
var
  W: integer;
begin
  W := 300;
  SendMessage(ComboBox1.Handle, CB_SETDROPPEDWIDTH, W, 0);
end;

<< Back to main page