CEBSS Posted November 13, 2008 Posted November 13, 2008 (edited) Hi I do not know how to enable a "grayed" button once a criteria has been met. My input box must = 6 numbers. (no less or no more). Once the 6 digits are inserted the ok button must be enabled. Please asist Thanks Alistair Edited November 13, 2008 by CEBSS
Malkey Posted November 13, 2008 Posted November 13, 2008 Hi I do not know how to enable a "grayed" button once a criteria has been met. My input box must = 6 numbers. (no less or no more). Once the 6 digits are inserted the ok button must be enabled. Please asist Thanks AlistairSee if this is what you are after. expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> CompName() Func CompName() Local $Flag = 0 GUICtrlCreateGroup("", -679, -497, 200, 200) ;close group GUICreate("POS SETUP", 1279, 745) $Alistair = GUICtrlCreateInput("", 226, 100, 42) GUICtrlSetLimit($Alistair, 6, 6) GUICtrlCreateLabel("SC", 200, 100) GUICtrlCreateLabel("E001", 273, 100) $MFS1OK = GUICtrlCreateButton("OK", 150, 220, 226, 55) ControlDisable("POS SETUP", "", $MFS1OK) GUICtrlCreateLabel("PLEASE ENTER MFS 1 COMPUTER NAME AND CLICK OK", 100, 55) GUISetState() While 1 $msg = GUIGetMsg() $Cousin = GUICtrlRead($Alistair) Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case StringLen($Cousin) = 6 And $Cousin < "999999" And $Cousin > "000001" And $Flag = 0 $Flag = 1 ControlEnable("POS SETUP", "", $MFS1OK) Case $msg = $MFS1OK MsgBox(0, "", "go") GUISetState(@SW_HIDE) ExitLoop EndSelect WEnd ;Call("POSNO") Exit EndFunc ;==>CompName
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now