steve8tch Posted January 22, 2005 Share Posted January 22, 2005 I have got a feeling I am being really thick here.. I have a gui with an input box - eg "type PC name in here...blah..blah" Whilst my fingers are on the keyboard - I would like to hit the 'ENTER' key to take some action. I have configured a button to do this - but it can't be in focus whilst I am typing in the input box. I would quite like the input box in my GUI to act in a similar way to a 'Windows' input box - you can just hit 'ENTER' to action the input box - you do not need to click something with a mouse. Can I configure the GUI to do this. ? Thanks Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 22, 2005 Administrators Share Posted January 22, 2005 I have got a feeling I am being really thick here.. I have a gui with an input box - eg "type PC name in here...blah..blah"Whilst my fingers are on the keyboard - I would like to hit the 'ENTER' key to take some action. I have configured a button to do this - but it can't be in focus whilst I am typing in the input box.I would quite like the input box in my GUI to act in a similar way to a 'Windows' input box - you can just hit 'ENTER' to action the input box - you do not need to click something with a mouse.Can I configure the GUI to do this. ?ThanksYeah, you need to set a button as "default". Use GUICtrlSetState with the $GUI_DEFBUTTON state. The button should then have a slightly darker highlight to show that when you press enter it will be the default. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
steve8tch Posted January 22, 2005 Author Share Posted January 22, 2005 Thanks - I had looked at the state table list for ages - and I suppose I didn't really know what was meant by "Control will be set as the default button on the window" - so I never tried it !! ...but now I know. Many thanks. 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