Merchants Posted July 14, 2011 Share Posted July 14, 2011 I wana set the input box to numbers wel that works but then i wana set it back to default and that does not work got a idea to fix? #include <EditConstants.au3> #include <GUIConstantsEx.au3> Global $GUI[5] $GUI[0] = GUICreate("test1", 250, 30) $GUI[1] = GuiCtrlCreateInput("", 5, 5, 100, 20) $GUI[2] = GUICtrlCreateButton("Change Style", 110, 4, 135, 22) $GUI[3] = True GUISetState() While 1 $GUI[4] = GUIGetMsg($GUI[0]) Select Case $GUI[4] = $GUI_EVENT_CLOSE Exit Case $GUI[4] = $GUI[2] If $GUI[3] Then GUICtrlSetStyle($GUI[1], $ES_NUMBER) GUICtrlSetData($GUI[1], "") GUICtrlSetData($GUI[2], "Change Style to normal") MsgBox(64,"Change Style", "Input change to numbers only") $GUI[3] = False Else GUICtrlSetStyle($GUI[1], Default) ;Some how this does not work... GUICtrlSetData($GUI[1], "") GUICtrlSetData($GUI[2], "Change Style") MsgBox(64,"Change Style", "Input change to Default") $GUI[3] = True EndIf EndSelect WEnd Link to comment Share on other sites More sharing options...
taietel Posted July 14, 2011 Share Posted July 14, 2011 Replace Default with $GUI_SS_DEFAULT_INPUT. Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
Merchants Posted July 14, 2011 Author Share Posted July 14, 2011 works ty Link to comment Share on other sites More sharing options...
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