- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page