xbrowse, bkeydown and number

Post Reply
JoséQuintas
Posts: 48
Joined: Tue Feb 09, 2021 4:20 pm

xbrowse, bkeydown and number

Post by JoséQuintas »

Code: Select all | Expand

      :bKeyDown := { | nKey | FWBrowseKey( xDlg, xControl, nKey, ... ) }

Code: Select all | Expand

   CASE IsRange( nKey, 32, 127 ) 
      cFilter += Upper( Chr( nKey ) )
If type letters ok
if type numbers from normal keyboard ok
if type numbers from numeric keyboard not
Is it expected ?

Note:
1 from normal keyboard returns 49
1 from numeric keyboard returns 97
User avatar
karinha
Posts: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: xbrowse, bkeydown and number

Post by karinha »

Mira se ayuda,

Code: Select all | Expand

// C:\FWH..\SAMPLES\TECLAS.PRG

#Include "FiveWin.Ch"

FUNCTION Main()

   LOCAL oWnd

   DEFINE WINDOW oWnd TITLE "Testando as Teclas - Caixa Alta e Baixa"

   oWnd:bKeyDown = { | nKey | MsgInfo( "Caixa Baixa: " + Str( nKey ) ) }

   oWnd:bKeyChar = { | nKey | MsgInfo( "Caixa Alta.: " + Str( nKey ) ) }

   ACTIVATE WINDOW oWnd

RETURN NIL
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Post Reply