FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Exit DTPICKER control with K_enter
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Exit DTPICKER control with K_enter
Posted: Sat Sep 02, 2006 01:18 AM

Hi everyone,

How can I make fw to exit a DTPicker control with the enter and/or return key?

Thank you,

Reinaldo

Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Exit DTPICKER control with K_enter
Posted: Sun Sep 03, 2006 02:16 AM

I find that I can only exit a dtpicker control by pressing the TAB key. I have tried changing the methods on the class to no avail.

There has to be a way to exit this control using the <return> or <enter> keys.

any ideas?

Reinaldo.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Exit DTPICKER control with K_enter
Posted: Mon Sep 04, 2006 08:47 AM

Reinaldo,

If you change this in samples\TestDtp.rc:

PUSHBUTTON "Close", 103, 148, 6, 50, 14

and build samples\TestDtp.prg, it properly goes to next control pressing enter.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Exit DTPICKER control with K_enter
Posted: Mon Sep 04, 2006 05:33 PM
Antonio;

Thank you for your help.

It is a start. Won't quite work for me, for I want to focus the next get. But it is an idea. I tried redefining the button as:
	REDEFINE BUTTON ID 103 OF ::odlg PROMPT "&Next" ACTION iif( oget[8]:lFocused, ::odlg:GoNextCtrl( ::odlg:hWnd ), )

oget[8] is the dtpicker object. But what it does is that it skips the dtpicker control altogether. I'll keep working on it. Any other idea is much welcomed.

thank you,


Reinaldo.
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Exit DTPICKER control with K_enter
Posted: Mon Sep 04, 2006 10:30 PM

Reinaldo,

The Tab key is the correct key for Windows apps. The Enter key is a holdever from the DOS era. In Windows apps, the Enter key is supposed to trigger the default pushbutton, which is usually the OK button on a dialog.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Exit DTPICKER control with K_enter
Posted: Tue Sep 05, 2006 12:31 PM

Yes, I realize that. However, there are circumstances where it is much more convenient to do data entry using the numeric keypad and move from field to field using the enter key. You should see the speed of some users doing data entry of item number, units, date and back around. Item after item after item... Forcing them to use the tab key will seriously slow the process.

My problem was with the dpicker class field. I changed it to a standard tget field to pickup the date and it working as needed.

Thank you for your reply,

Reinaldo.

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Exit DTPICKER control with K_enter
Posted: Tue Sep 05, 2006 09:31 PM

Reinaldo,

I see your point. I have not come across a situation where they were only entering numbers.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion