jacQues Posted February 14, 2008 Share Posted February 14, 2008 The following works great to make a button the default for Enter: GUICtrlSetState( $ButtonControl ,$GUI_DEFBUTTON) However, the initial state of a GUI is that there's no default button. In my program there is a button that people can press but after its pressed I don't want it to be the default button. How can I do this? There is no $GUI_NODEFBUTTON... I tried some methods, but none of them works for me: GUICtrlSetState( $ButtonControl ,$GUI_NOFOCUS) GUICtrlSetState( $ButtonControl ,$GUI_DISABLE) then $GUI_ENABLE GUICtrlSetState( $ButtonControl ,$GUI_HIDE) then $GUI_SHOW GUICtrlSetState(GUICtrlCreateDummy(),$GUI_FOCUS) GUICtrlSetState(GUICtrlCreateDummy(),$GUI_DEFBUTTON) jacQues Link to comment Share on other sites More sharing options...
jacQues Posted February 14, 2008 Author Share Posted February 14, 2008 A flash of insight gave me a workaround: $x = GUICtrlCreateButton("",1,1,1,1,0x80) GUICtrlSetState($x,$GUI_DEFBUTTON) GUICtrlDelete($x) But if anyone knows a "clean" method, please post it here. jacQues Link to comment Share on other sites More sharing options...
jacQues Posted February 14, 2008 Author Share Posted February 14, 2008 A flash of insight gave me a workaround: $x = GUICtrlCreateButton("",1,1,1,1,0x80) GUICtrlSetState($x,$GUI_DEFBUTTON) GUICtrlDelete($x) But if anyone knows a "clean" method, please post it here. jacQues 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