Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28456 Discussions

How to set a specific button as default selction ?

reidar
New User
464 Views
In a dialogue box I want to set a specific button as the default selection so that the user
just have to press CR on the keyboard to activate the "Continue" or "OK" button in a dialogue box
to proceed.

For example, if I activate a specific window (or a menu item) in a MDI application with the mouse,
I can just press the keybord return button to activate a control in an already opened modless dialogue box.

Can anybody give me a clue?

Reidar
0 Kudos
2 Replies
bmchenry
New Contributor II
464 Views
Depends on how you are creating the dialog box: QuickWin? Winteracter? etc
normally you group dialog components, disable/enable them when loaded, load them, then focus is brought to the dialog you set the default action.
perhaps a sample code of how you are loading the dialog might help
0 Kudos
anthonyrichards
New Contributor III
464 Views
This can be done when creating the dialog. In the resource editor, Select the control you want to be the default when the dialog opens. Open its Properties tab and select the 'style' tab and you will see a Default check box. select it and that control will have focus every time you open the dialog. If you are using IVF in Visual Studio and have the dialog open, selecting Format from the VS menu bar will show you a drop-down menu with a 'Tab Order' option. Select that and the tab order of all the dialog controls will be shown. Number 1 is the default control which will have focus when you open the dialog. If you click a control at this stage, that will become number 1 in the tab order.
0 Kudos
Reply