什么LIST,
如果是LISTBOX的话,先设为自画风格,然后在绘画事件里自己把图片画上去.

解决方案 »

  1.   

    先设置成自绘,然后在List的OnDrawItem里自己画。
      

  2.   

    对,先自画!
    procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer;  Rect: TRect; State: TOwnerDrawState);var  Rect1: TRect;  Rect2: TRect;begin  Inc(Rect.Bottom,16);  Rect1.Left := Rect.Left;  Rect1.Bottom := Rect.Bottom ;  Rect1.Right := Rect1.Left +32;  Rect1.Top := Rect.Top;  Rect2.Left := 0;  Rect2.Right :=32;  Rect2.Top := 0;  Rect2.Bottom := 32;  TCombobox(Control).Canvas.CopyRect(Rect1,image1.Canvas,Rect2);end;procedure TForm1.ComboBox1MeasureItem(Control: TWinControl; Index: Integer;  var Height: Integer);begin  Height := 32;end;
      

  3.   

    将style设置成 csownerdrawvariable 
    后在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;