我有一个包含'System.Windows.Forms.CheckedListBox'
对象的 PowerShell 表单。目前我可以一次选择多个复选框选项:
有没有一种简单的方法可以做出CheckedListBox
唯一的选择?
还是我必须'onClick'
在我的脚本中使用一些事件逻辑?
CheckListBox 属性:
$checkedlistbox2.BackColor = 'Control'
$checkedlistbox2.BorderStyle = 'None'
$checkedlistbox2.CheckOnClick = $True
$checkedlistbox2.ColumnWidth = 56
$checkedlistbox2.FormattingEnabled = $True
[void]$checkedlistbox2.Items.Add("W2K")
[void]$checkedlistbox2.Items.Add("WXP")
[void]$checkedlistbox2.Items.Add("WS7")
$checkedlistbox2.Location = '107, 284'
$checkedlistbox2.MultiColumn = $True
$checkedlistbox2.Name = "checkedlistbox2"
$checkedlistbox2.SelectionMode = 'None'
$checkedlistbox2.Size = '192, 15'
$checkedlistbox2.TabIndex = 66