oget:bKeyChar

oget:bKeyChar

Postby MarcoBoschi » Tue Feb 07, 2012 2:39 pm

Dear friends,
In the first get oget1: If I press "/"
the cursor must jump to the next object without KV_TAB pressed ( or VK_RETURN )
and oget:varget ==>>>> "/ "


Please need help!

marco


Code: Select all  Expand view
#include "fivewin.ch"

FUNCTION MAIN()

 LOCAL oDlg
 LOCAL oGet1 , cGet1 := SPACE( 4 )
 LOCAL oGet2 , cGet2 := SPACE( 4 )

 DEFINE DIALOG oDlg

 @ 1 , 1 GET oGet1 VAR cGet1 OF oDlg

 @ 3 , 1 GET oGet2 VAR cGet2 OF oDlg

 oGet1:bKeyChar := { | nKey | fun_get( oGet1 , nKey ) }

 ACTIVATE DIALOG oDlg  CENTER

RETURN NIL


FUNCTION FUN_GET( oGet , nKey )
LOCAL cGet := oGet:varget()

IF CHR( nKey ) = "/"

   // I have to assign PADR( "/" , 4 ) to oGet and exit from it
   // new focus has to be in oget2

ENDIF

RETURN NIL
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: oget:bKeyChar

Postby Enrico Maria Giordano » Tue Feb 07, 2012 3:36 pm

Code: Select all  Expand view
#include "fivewin.ch"

FUNCTION MAIN()

 LOCAL oDlg
 LOCAL oGet1 , cGet1 := SPACE( 4 )
 LOCAL oGet2 , cGet2 := SPACE( 4 )

 DEFINE DIALOG oDlg

 @ 1 , 1 GET oGet1 VAR cGet1 OF oDlg

 @ 3 , 1 GET oGet2 VAR cGet2 OF oDlg

 oGet1:bKeyChar := { | nKey | fun_get( oGet1, oGet2, nKey ) }

 ACTIVATE DIALOG oDlg  CENTER

RETURN NIL


FUNCTION FUN_GET( oGet1, oGet2, nKey )
LOCAL cGet := oGet1:varget()

IF CHR( nKey ) = "/"

   // I have to assign PADR( "/" , 4 ) to oGet and exit from it
   // new focus has to be in oget2

   oGet1:VarPut( PADR( "/" , 4 ) )
   oGet1:Refresh()

   oGet2:SetFocus()

ENDIF

RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8712
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: oget:bKeyChar

Postby MarcoBoschi » Tue Feb 07, 2012 4:16 pm

wow
it's easy....for you... :cry:
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests