【发布时间】:2016-09-28 19:05:30
【问题描述】:
我正在使用 ObjectListView!太棒了!我有一个OLV使用细节问题,item栏是Button!如何设置按钮图标?我很抱歉写错了:)
【问题讨论】:
-
是设置按钮的图标示例删除图标或编辑图标
标签: c# winforms objectlistview
我正在使用 ObjectListView!太棒了!我有一个OLV使用细节问题,item栏是Button!如何设置按钮图标?我很抱歉写错了:)
【问题讨论】:
标签: c# winforms objectlistview
假设! 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];
};
}
欲了解更多信息Have a look at this
【讨论】: