gpt4 book ai didi

c# - Windows 窗体中列表框内的复选框

转载 作者:可可西里 更新时间:2023-11-01 09:48:11 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
CheckBox inside ListBox
How to insert a check box inside a list box in C#?

我想在应用程序的窗口中的列表框中添加复选框。

这是我的代码:

CheckBox cb = new CheckBox();
while (dr.Read())
{

listBox1.Items.Add(String.Format("{0} {1}",cb,dr["Stu_Name"]));
}

但是,它没有产生预期的结果。

我想要的是来自数据读取器的每个列值之前的复选框?有什么建议吗?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com