[英]How to add border to items in a listview control using C#?
我正在使用listview控件,我通過ImageList添加圖像
if (dtPhoto.Rows.Count > 0)
{
foreach (DataRow dr in dtPhoto.Rows)
{
if (dr["Photo"].ToString() != "")
{
byte[] barrImg = (byte[])dr["Photo"];
MemoryStream mStream = new MemoryStream(barrImg);
imageList.Images.Add(Image.FromStream(mStream));
}
}
}
imageList.ImageSize = new Size(75, 75);
lvItem.LargeImageList = imageList;
for (int i = 0; i < imageList.Images.Count; i++)
{
lvItem.Items.Add(dtPhoto.Rows[i]["Name"].ToString() + "\n" + "(" + dtPhoto.Rows[i]["Type"].ToString() + ")", i);
}
我想為Listview中的每個項添加邊框是否可能? 請幫忙。 提前致謝。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.