Escape or control key in a tGet

Escape or control key in a tGet

Postby Raymond Fischbach » Mon Sep 20, 2010 8:13 pm

Hello all,

In a dialog, I setup a tGet to enter a numeric value in a field.
This is done in a loop. This means that when the user has entered the field value, I create the record and stay in the same dialog for the next entry.

It would be very helpful to the user to be able to press the Escape key or even any non numeric key to leave the loop.
I looked at the help files and found the following methods:
bPostKey (codeblock)
KeyChar (codeblock I suppose)
Handlevent (???)
The problem is that the doc doesn't give any description on how to use them.

Therefore I ask if any body could tell me which method should be used.

Can you also give me a hint on how to implement it.

Many thanks,
Raymond
Raymond Fischbach
www.mouches.org
User avatar
Raymond Fischbach
 
Posts: 48
Joined: Sun Oct 30, 2005 9:29 am
Location: Belgium

Re: Escape or control key in a tGet - solved

Postby Raymond Fischbach » Tue Sep 21, 2010 8:38 pm

Hi all,

I have find an answer to my problem so I close the subject.

Raymond
Raymond Fischbach
www.mouches.org
User avatar
Raymond Fischbach
 
Posts: 48
Joined: Sun Oct 30, 2005 9:29 am
Location: Belgium

Re: Escape or control key in a tGet

Postby Antonio Linares » Sat Sep 25, 2010 6:59 am

Raymond,

Would you mind to share how you have implemented it ? thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Escape or control key in a tGet

Postby Raymond Fischbach » Sat Oct 02, 2010 8:15 pm

Hello Antonio,

Sorry for the late reply, I didn't see your message.

In fact I used a workaround. I detect it at the window level:
Code: Select all  Expand view
//*** clavier
oWnd:bKeyDown := {|nkey|iif(nKey == C_ESC,oWnd:End(),)}
 


HTH,
Raymond
Raymond Fischbach
www.mouches.org
User avatar
Raymond Fischbach
 
Posts: 48
Joined: Sun Oct 30, 2005 9:29 am
Location: Belgium


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 4 guests

cron