有呀,就是ComboboxEx呀,在WIN32那一面板中!

解决方案 »

  1.   

    ComboBoxEx要Delphi6里面才有吧?
      

  2.   

    也可以设置ownerdraw然后自己画
      

  3.   

    我手头有这样的控件,把你的E-Mail贴出来,我发给你.
      

  4.   

    自己做,很简单的。
    procedure TUser_EditForm.ComboBox1DrawItem(Control: TWinControl;
      Index: Integer; Rect: TRect; State: TOwnerDrawState);
    var
      Btm:TBitmap;
    begin
      Btm:=TBitmap.create;
      ComboBox1.Canvas.StretchDraw(Rect,Btm);
      ComboBox1.Canvas.Brush.Bitmap:=nil; 
    end;
      

  5.   

    superljj():  好象没起什么作用?
      

  6.   

    需要将style设为csOwnerDrawFixe或csOwnerDrawVariable
      

  7.   

    procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer;
      Rect: TRect; State: TOwnerDrawState);
    var bitmap:TBitmap;
        pos:Integer;
    begin
      with Control as TComboBox do begin
        Canvas.FillRect(Rect);
        bitmap:=TBitmap(Items.Objects[Index]);
        pos:=0;
        if Bitmap<>nil then begin
          Canvas.BrushCopy(Bounds(Rect.Left+2,Rect.Top+2,bitmap.Width,bitmap.Height),
            bitmap,Bounds(0,0,bitmap.Width,bitmap.Height),clRed);
          pos:=bitmap.width+8;
          end;
        Canvas.TextOut(Rect.Left+pos,Rect.Top,Items[Index]);
        end;
    end;procedure TForm1.ComboBox1MeasureItem(Control: TWinControl; Index: Integer;
      var Height: Integer);
    begin
      Height:=20;
    end;procedure TForm1.Button1Click(Sender: TObject);
    var bitmap:TBitmap;
    begin
      bitmap:=TBitmap.Create;
      try
        bitmap.LoadFromFile(DirectoryListBox1.Directory+'\'+Edit1.Text);
      except
        bitmap:=nil;
      end;
      ComboBox1.Items.AddObject(Edit2.Text,bitmap);
    end;end.