enable button if $texbox not empty
Posted: Fri Dec 16, 2016 3:07 am
Dear All,
I cannot figure out how to enable a button when the $loginnametextbox is not empty. It stay disable. Here i 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
}
}
I cannot figure out how to enable a button when the $loginnametextbox is not empty. It stay disable. Here i 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
}
}