我定义了一个listBox,怎么给他添加checkbox,求详细代码 30
privatestring[]ringingMethods={"PlainBob","ReverseCanterbury","Grandsire","Stedman","...
private string[] ringingMethods = {"Plain Bob", "Reverse Canterbury",
"Grandsire", "Stedman", "Kent Treble Bob", "Old Oxford Delight",
"Winchendon Place", "Norwich Suprise", "Crayford Little Court" };
foreach (string methodName in ringingMethods)
{
CheckBox method=new CheckBox();
///////////////////////// method.Content = methodName;//////////////
我想这样赋值,可是这行代码是错的,到底该怎么写
methods.Items.Add(method);
} 展开
"Grandsire", "Stedman", "Kent Treble Bob", "Old Oxford Delight",
"Winchendon Place", "Norwich Suprise", "Crayford Little Court" };
foreach (string methodName in ringingMethods)
{
CheckBox method=new CheckBox();
///////////////////////// method.Content = methodName;//////////////
我想这样赋值,可是这行代码是错的,到底该怎么写
methods.Items.Add(method);
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询