Don't want ENTER to push button
Don't want ENTER to push button
I have a dialog with a bunch of GETS, I want the user to press Enter through the fields as he enters them.
When I press enter, it presses the 'Save' button. How can I make it not do that, forcing the user to Click "Save" when he is ready.
When I press enter, it presses the 'Save' button. How can I make it not do that, forcing the user to Click "Save" when he is ready.
Many thanks
Ollie.
Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
Ollie.
Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
It hasn't been set to default. As far as I know. (There is no DEFAULT clause in the button definition How do I set default off?
Code: Select all
REDEFINE BTNBMP oBtn_Save ID IDOK of Dlg_SUB PROMPT "Save" TOP RESOURCE "save" ACTION ( Update_dbmain(), Dlg_SUB:END() ) TOOLTIP "Save"
REDEFINE BTNBMP oBtn_Cancel ID IDCANCEL of Dlg_SUB PROMPT "Cancel" TOP RESOURCE "cancel" ACTION ( oDBF_MAIN:Load(), Dlg_Dbmain:Update(), Dlg_SUB:END() ) TOOLTIP "Cancel"
Many thanks
Ollie.
Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
Ollie.
Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Ollie,
>I have a dialog with a bunch of GETS, I want the user to press Enter through the fields as he enters them.
This is DOS behavior not Windows behavoir. Most users will expect the Tab key to move between fields, and the Enter key to push the default button. Having the Enter key work this way prevents them from having to use the mouse to press the button.
James
>I have a dialog with a bunch of GETS, I want the user to press Enter through the fields as he enters them.
This is DOS behavior not Windows behavoir. Most users will expect the Tab key to move between fields, and the Enter key to push the default button. Having the Enter key work this way prevents them from having to use the mouse to press the button.
James
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Ollie,
>Is there a way for the TAB key to jump to the next TAB/Folder or does one need to use the mouse to change TABS.
Well, you can't have the Tab key jump to the next control AND jump to the next folder. If you define a hot-key in the folder name (e.g. "&Orders" ) then the user can use Alt-O to jump to the next folder.
I think you would get a lot ouf of reading the book, "About Face 2.0, The Essentials of Interaction Design," by Alan Cooper and Robert M. Reimann. This is a teriffic book about Windows application interface design. You can find out more about it on my website on this page:
http://ourworld.compuserve.com/homepage ... rogram.htm
James [/quote]
>Is there a way for the TAB key to jump to the next TAB/Folder or does one need to use the mouse to change TABS.
Well, you can't have the Tab key jump to the next control AND jump to the next folder. If you define a hot-key in the folder name (e.g. "&Orders" ) then the user can use Alt-O to jump to the next folder.
I think you would get a lot ouf of reading the book, "About Face 2.0, The Essentials of Interaction Design," by Alan Cooper and Robert M. Reimann. This is a teriffic book about Windows application interface design. You can find out more about it on my website on this page:
http://ourworld.compuserve.com/homepage ... rogram.htm
James [/quote]
- Detlef Hoefner
- Posts: 312
- Joined: Sat Oct 08, 2005 9:12 am
- Location: Germany
- Contact:
Ollie,Ollie wrote:It hasn't been set to default. As far as I know. (There is no DEFAULT clause in the button definition How do I set default off?
Code: Select all
REDEFINE BTNBMP oBtn_Save ID IDOK of Dlg_SUB PROMPT "Save" TOP RESOURCE "save" ACTION ( Update_dbmain(), Dlg_SUB:END() ) TOOLTIP "Save" REDEFINE BTNBMP oBtn_Cancel ID IDCANCEL of Dlg_SUB PROMPT "Cancel" TOP RESOURCE "cancel" ACTION ( oDBF_MAIN:Load(), Dlg_Dbmain:Update(), Dlg_SUB:END() ) TOOLTIP "Cancel"
a redefine-ID of 1 or 2 ( IDOK or IDCANCEL ) will give your button the default behaviour when pressing the enter key.
Maybe that helps,
Detlef