FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To Antonio:
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
To Antonio:
Posted: Mon Apr 02, 2012 03:25 AM
Antonio:


How can I call a procedure from within a GET via pressing one of the function keys (F1...F12) ? I've tried the following but does not work.
Code (fw): Select all Collapse
   @ 55,45 GET oGets[5] VAR cCode       OF oDlg SIZE 40,10 PIXEL  PICTURE "@!" ;
                        WHEN EVAL({|| SETKEY(VK_F2, {||  cVar := cCode,  LookUp(@cVar),   ;
                                  cCode := cVar,  oGets[5]:varget(), oGets[5]:refresh()}), .T.})


Thank you very much.
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio:
Posted: Mon Apr 02, 2012 05:37 AM

Pedro,

Tienes un ejemplo en FWH\samples\TestKey.prg :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: To Antonio:
Posted: Mon Apr 02, 2012 06:33 PM

Antonio:

Thank you for your help. What I'm trying to achieve is to "activate" the SetKey() during the get's WHEN clause and deactivate it in the VALID one. Still I cannot make this work. Any ideas ? Thank you.

Gustavo

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: To Antonio:
Posted: Mon Apr 02, 2012 07:41 PM

Use oGet:bKeyDown instead.

EMG

Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: To Antonio:
Posted: Tue Apr 03, 2012 12:24 AM

Enrico:

Can you provide a small example ?

Thank you.

Gustavo

Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: To Antonio:
Posted: Tue Apr 03, 2012 03:15 AM

Antonio:

Can you post an example ? The Testkey.prg addresses a global setkey, what I'm looking is a more specific, defined at the get level. Different gets using different SETKEYS(). All shall be activated when entering the GET field and deactivating it when exiting.Thank you.

Gustavo

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: To Antonio:
Posted: Tue Apr 03, 2012 08:04 AM
HunterEC wrote:Enrico:

Can you provide a small example ?

Thank you.


Gustavo


Code (fw): Select all Collapse
oGet:bKeyDown = { | nKey | If( nKey = VK_???, MyFunc(), ) }


EMG

Continue the discussion