0
我正在使用ObjectListView!太棒了!我有一个问题OLV使用细节,项目列是按钮!如何设置按钮图标?我很抱歉写错了:)带图标的C#ObjectListView按钮?
我正在使用ObjectListView!太棒了!我有一个问题OLV使用细节,项目列是按钮!如何设置按钮图标?我很抱歉写错了:)带图标的C#ObjectListView按钮?
假设!您在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
是一组按钮的图标示例删除图标或编辑iicon – DasturchiUZ