I'm interested in having the user at least check one option. It's not important how many, but at least one needs to be checked. And if not, an error needs to be generated.
Is there a way to do this with a GroupBox or another type of Container?
Code:
$groupBox1 = New-Object System.Windows.Forms.GroupBox
$groupBox1.Location = New-Object System.Drawing.Point(8, 120)
$groupBox1.Size = New-Object System.Drawing.Size(120, 144)
$groupBox1.TabIndex = 0
$groupBox1.TabStop = $false
$groupBox1.Text = 'Options:'
$checkBox1 = New-Object System.Windows.Forms.CheckBox
$checkBox1.Location = New-Object System.Drawing.Point(8, 8)
$checkBox1.TabIndex = 1
$checkBox1.Text = 'Banana'
$checkBox2 = New-Object System.Windows.Forms.CheckBox
$checkBox2.Location = New-Object System.Drawing.Point(8, 40)
$checkBox2.TabIndex = 2
$checkBox2.Text = 'Apple'
I found some information, but it's all for javascript.
Thank you for your help.
Aucun commentaire:
Enregistrer un commentaire