How Do I Set a Default Push Button for the Form? (Magic xpa 3.x)
If you have several buttons on a form, you may want to designate one of them to be the default that is pressed when the user presses Enter.
For example, on this screen, we have the Close button selected by default. Although the cursor is positioned on Customer ID when the window opens, pressing Enter will cause the task to close.
Here is how you do it.
|
|
-
Create your push button, and give it a control name.
-
Go to Form Properties (Alt+Enter when no control is selected).
-
In the Input section, go to the Default Button property.
-
Zoom from the first field to select your button control name.
-
Or, zoom from the expression area to the right to create an expression that, at runtime, evaluates to a valid button control name.
Now, when you run your program, the button you chose will be the default button.
|
|
The Online and Rich Client Samples projects (program TS27 and RTS27)