Link to home
Start Free TrialLog in
Avatar of Jean-Jacques CELMA
Jean-Jacques CELMAFlag for France

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 :

$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
	}
	
}

Open in new window

Capture.PNG
ASKER CERTIFIED SOLUTION
Avatar of footech
footech
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial