不知道你想从哪个部分做起combox是由一个editbox加上一个随时隐藏的listbox构成.
当然如果你乐意的话,editbox和listbox你也可以自己做呀,呵呵(学习嘛)

解决方案 »

  1.   

    在delphi中用一个edit 和一个 ComboBox 就可以实现了.为它的一些事件加上些代码就可以实现了,IE就是这样做的!
      

  2.   

    以下是实现查询的
    combobox中的数据要从注册表读HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedUrls
    begin
      RegisterComponents('Samples', [TIEComboBox]);
    end;{ TIEComboBox }constructor TIEComboBox.Create(AOwner: TComponent);
    begin
      inherited;
      HasLeadChr:=false;
      FSmartInput:=true;
    end;procedure TIEComboBox.KeyPress(var Key: Char);
    var
      i,j,t:Integer;
      s:string;
      found:Boolean;
    begin
      Inherited;
      if FSmartInput then
      begin
        Found:=false;
        if (Key in LeadBytes) and (not HasLeadChr) then
        begin
          HasLeadChr:=true;
          LeadChr:=Key;
          Key:=#0;
        end
        else    //Double Byte support
        if HasLeadChr or  ((Key >=#32) and (Key<=#126)) then
        begin
          if HasLeadChr then
          begin
            s:=LeadChr+Key;
            HasLeadChr:=false;
          end
          else
            s:=Key;
            t:=SelStart;
            Text:=Copy(Text,1,SelStart)+Copy(Text,SelStart+SelLength+1,Length(Text)-SelLength-1);
          for i:=0 to items.Count-1 do
          begin
            if Pos(Text+s,items[i])=1 then
            begin
              j:=Length(Text);
              Text:=items[i];
              SelStart:=j+Length(s);
              SelLength:=Length(Text)-j;
              Found:=True;
              if Assigned(FOnSmartInputed) then FOnSmartInputed(Self);
              Break;
            end;
          end;
          if not Found then
          begin
            Text:=Copy(Text,1,t)+s+Copy(Text,t+1,Length(Text)-t+1);
            SelStart:=t+Length(s);
          end;
          Key:=#0;
        end;
      end;
    end;
    procedure TIEComboBox.SetOnSmartInputed(const Value: TNotifyEvent);
    begin
      FOnSmartInputed := Value;
    end;procedure TIEComboBox.SetSmartInput(const Value: Boolean);
    begin
      FSmartInput := Value;
    end;