带有图标的ObjectListView按钮
本文关键字:ObjectListView 按钮 图标 | 更新日期: 2023-09-27 18:09:13
我正在使用ObjectListView!这是美妙的!我有一个问题OLV使用细节,项目栏是按钮!如何设置按钮图标?很抱歉写错了
假设!在ObjectListView
中有一列olvButton
。您只需要在初始化ObjectListView
时创建ImageGetter
委托并返回Image。
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];
};
}
更多信息请看