我有窗口应用程序。现在,在运行时,我在该页面内添加一个页面和复选框列表。
为此我的代码是:
Form inputBox = new Form();
inputBox.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
inputBox.ClientSize = size;
inputBox.Text = "Doc Selection";
inputBox.StartPosition = FormStartPosition.CenterScreen;
inputBox.ControlBox = false;
System.Windows.Forms.CheckedListBox DocTypeChkList = new CheckedListBox();
DocTypeChkList.Location = new System.Drawing.Point(15, 10);
DocTypeChkList.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
DocTypeChkList.Items.Add("B");
DocTypeChkList.Items.Add("P");
DocTypeChkList.Items.Add("Other");
DocTypeChkList.SelectionMode = SelectionMode.One;
inputBox.Controls.Add(DocTypeChkList);
现在,在运行时用户可以检查多个复选框...我希望一次只检查一个复选框而不是多个...我已经给出了选择模式“ONE” ..
你能告诉我。我错过了什么???
谢谢