Delphi 6里面就有TComboBoxEx控件,可以实现你想要的功能

解决方案 »

  1.   

    我希望是在delphi5中实现,谢谢你了!!有没有人知道呀?
      

  2.   

    将ComboxBox1的Style设为csOwnerDrawFixed,然后在OnDrawItem中画,
    procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer;
      Rect: TRect; State: TOwnerDrawState);
    begin
      with ComboBox1 do
      begin
        Canvas.FillRect(Rect);
        ImageList1.Draw(Canvas, Rect.Left, Rect.Top + 2, Index);
        Canvas.TextOut(Rect.Left + 20, Rect.Top + 2, Items[Index]);
      end;
    end;
      

  3.   

    可以的,在窗体上放一个ImageList,放几个16*16的位图进去,图像个数和ComboBox的项目个数要一样,还要将ComboBox的Style属性设为csOwnerDrawFixed。
      

  4.   

    不对,必须的将style设置成 csownerdrawvariable 才行的
      

  5.   

    在问一下,如何可以作成象QQ中的我的头像一样那样大的图片,使combobox的大小和图片的大小一样,这是如何实现的!!!?谢谢了