agross Posted February 10, 2006 Posted February 10, 2006 How can I implement a default button (one that is automatically selected by hitting the Enter button) in a custom window? In other words I have designed a custom window with several buttons and would like to close the window by simply hitting the Enter button rather than using the mouse to click on the "Close Window" button.
LaRetta Posted February 10, 2006 Posted February 10, 2006 You want to close the window simply by hitting ENTER but the window is nothing but buttons? If User has their hand on the mouse anyway, a click (whether on a button or X) seems simpler than reaching up to hit the ENTER. Well, in vs. 8, you can tab to (and activate) a button. You can also use an event-trigger plugin. Or you might be able to take advantage of Find Mode[] which will activate upon ENTER (as I've seen Comment do). But, if the only thing on the window is buttons, it seems simpler to have each button end with a sub-script of Close Window[] after it does its thing... You can also ignore the window and let it disappear behind and/or close it at your leisure or let it remain in the background to be brought forward again when needed. How often will this window be called? If there are no fields on this window layout then you won't be dealing with record-locking issues if you choose to leave it open. Does the User enter data into fields in this window also? If we understood more of your process and purpose here, we might have better suggestions. LaRetta
agross Posted February 10, 2006 Author Posted February 10, 2006 Thanks for the quick response. The custom window which opens when the user clicks on a Line Item from the main Invoices window contains additional input fields as well as several custom buttons. One of the buttons is always the "Close" button which closes the window enabling the user to return to the main Invoices window. At the moment you need to mouse click on the "Close" button, but I was wondering how I could achieve the same action by simply pressing the Enter button (similar to how a dialog window works with a default button).
comment Posted February 10, 2006 Posted February 10, 2006 You could make your script open the new window and pause. When you have a paused script, hitting the Enter button will resume it, so the next step after the pause should be to close the window. The 'Close Window' button should be set to Resume script.
Recommended Posts
This topic is 6862 days old. Please don't post here. Open a new topic instead.
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