Jean-Jacques CELMA
asked on
PowerShell Studio 2016 : enable OK button if $texbox is not empty
Dear All,
I cannot figure out how to enable the OK button when entering a string in $loginnametextbox. it stay disable.
Here is my code :
I cannot figure out how to enable the OK button when entering a string in $loginnametextbox. it stay disable.
Here is my code :
$loginametextbox.Text = $null
$formEnableUsersForm_Load={
#TODO: Initialize Form Controls here
$buttonOK.Enabled = $false
}
$buttonOK_Click={
#TODO: Place custom script here
$buttonOK.Enabled = $false
$loginametextbox.Text= {
$CheckInput
}
If ($CheckInput.text.trim() )
{
$buttonOK.Enabled = $true
}
}
Capture.PNG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.