Hola.
Creo que vas a lograr un efecto similar a lo que buscas usando un
TComboBox con su propiedad
Style =
csSimple:
Código Delphi
[-]
...
implementation
CONST
CBOX_HEIGHT = 21;
procedure TForm1.FormCreate(Sender: TObject);
begin
with ComboBox1 do
begin
Style:= csSimple;
CharCase:= ecUpperCase;
Text:= '';
Height:= CBOX_HEIGHT;
end;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
with TComboBox(Sender) do
begin
if Text > '' then
begin
Query.Close;
Query.SQL.Clear;
Query.SQL.Add('SELECT CAMPO FROM TABLA');
Query.SQL.Add('WHERE CAMPO LIKE UPPER(:VALOR)');
Query.ParamByName('VALOR').AsString:= ComboBox1.Text+'%';
Query.Open;
while not Query.Eof do
begin
if Items.IndexOf(Query.FieldByName('CAMPO').AsString) = -1 then
ComboBox1.Items.Add(Query.FieldByName('CAMPO').AsString);
Query.Next;
end;
Height:= DropDownCount * CBOX_HEIGHT;
end
else
begin
Clear;
Height:= CBOX_HEIGHT;
end;
end;
end;
Saludos.