I have two checkboxes with CheckedChanged events. For some reason I cannot uncheck them with function TAGS-RESET call below. Any suggestions?
$checkboxMultipleDisplays_CheckedChanged = {
if ($checkboxMultipleDisplays.Checked = $true)
{
$global:objTag1 = "Multiple Displays"
}
else
{
$global:objTag1 = ""
}
}
$checkboxCustomSeating_CheckedChanged = {
if ($checkboxCustomSeating.Checked = $true)
{
$global:objTag2 = "Customizable Seating"
}
else
{
$global:objTag2 = ""
}
}
#region TAGS
function TAGS-RESET
{
$checkboxMultipleDisplays.Checked = $false
$checkboxMultipleDisplays.Enabled = $false
$checkboxCustomSeating.Checked = $false
$checkboxCustomSeating.Enabled = $false
$global:objTag1 = ""
$global:objTag2 = ""
}
function TAGS-ENABLE
{
$checkboxMultipleDisplays.Enabled = $true
$checkboxMultipleDisplays.Checked = $false
$checkboxCustomSeating.Enabled = $true
$checkboxCustomSeating.Checked = $false
$global:objTag1 = ""
$global:objTag2 = ""
}
#endregion
How to uncheck checkbox
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: How to uncheck checkbox
This is resolved. Coding error...
if ($checkboxMultipleDisplays.Checked = $true) should be if ($checkboxMultipleDisplays.Checked -eq $true)
if ($checkboxMultipleDisplays.Checked = $true) should be if ($checkboxMultipleDisplays.Checked -eq $true)