2016-09-28 71 views

回答

1

假設!您在ObjectListView中有一個名爲olvButton的列。您只需創建ImageGetter代表,同時初始化您ObjectListView並返回圖像。

private void InitializeObjectListView() 
{ 
    //Other settings for ObjectListView 
    this.ObjectLV.RowHeight = 40; 
    this.ObjectLV.EmptyListMsg = "No item found"; 

    //Set Image index for Button Column 
    this.olvButton.ImageGetter = delegate(object x) 
    { 
     //ImageList is a control in which I have added one Image. 
     return imagesList.Images[0]; 
    }; 
} 

欲瞭解更多信息Have a look at this