Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Enter key as tab key

cacciatore
Beginner
458 Views
Is it possible to use the enter key after typing a value in an edit box, so the cursor goes to another edit box ( or to another component, following the tab order) ?
I am using CVF PE 6.6B
Thanks,
Geraldo
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
458 Views
Yes. The simplest method is:

1) Remove "Default button" style from the IDOK button;
2) Add another button, say, "ID_NEXT". Uncheck "visible" and "tab stop" and add "Default button" style.
3) Add & DlgSetSub the following callback for it:
SUBROUTINE OnNext(Dlg,ID,iEvent)
USE DFLOGM
USE DFWIN, ONLY: SendMessage, WM_NEXTDLGCTL
TYPE(DIALOG):: Dlg
INTEGER::      ID,iEvent,iSt
iSt = SendMessage(Dlg%hWnd, WM_NEXTDLGCTL, 0, 0)
END SUBROUTINE OnNext

The idea is that the default button callback is called on Enter key; in it, just tell the dialog to set the focus to the next control.

Jugoslav
0 Kudos
cacciatore
Beginner
458 Views
Thanks, (once again)
Geraldo
0 Kudos
Reply