2024年4月29日发(作者:)

WinForms中重写ListBox控件

/*

**使用时

(1, "百里屠苏");

(2, "风晴雪");

(3, "方兰生");

(4, "欧阳少恭");

(5, "工长君");

(6, "古剑奇谭");

ionMode = xtended;//默认值是:只能选

择一项

在按钮的单击事件中:

private void button1_Click(object sender, EventArgs e)

{

for (int i = 0; i < ; i++)

{

//查看选择的所有项的显示内容

(edListBoxItems[i].ng());

(edListBoxItems[i].ng());

}

}

*/

SimListBox控件源代码如下:

using System;

using c;

using entModel;

using g;