2016-09-28 68 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