Simple just trying to get the textbox to disable if my checkbox is checked.
$NE_CheckedChanged={
#TODO: Place custom script here
IF ($NE.CheckState -eq 'Checked'){
$textbox1.Enabled = $false
}
else {
$textbox1.Enabled = $true
}
CHeck not disabling textbox
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: CHeck not disabling textbox
Instead, try looking for $NE.Checked like so:
- $checkbox1_CheckedChanged = {
- if ($checkbox1.Checked -eq $true) {
- $textbox1.Enabled = $false
- } else {
- $textbox1.Enabled = $true
- }
- }
DevinL
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: CHeck not disabling textbox
This is actually the easiest way to use a Boolean to assign a Boolean::
This is one of many reasons why "Forms" is so easy to program when you understand the design paradigm and how well done object and event design can simplify coding.
- $checkbox1_CheckedChanged = {
- $textbox1.Enabled = $checkbox1.Checked
- }