Sign in to follow this  
Followers 0
jacQues

Opposite of $GUI_DEFBUTTON?

3 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0