- Code: Select all Expand view
// VK_NEXT PAGE DOWN key
IF GETASYNCKEY( VK_NEXT )
QUIT
ENDIF
Regards, saludos.
// VK_NEXT PAGE DOWN key
IF GETASYNCKEY( VK_NEXT )
QUIT
ENDIF
//-> PAGE UP 33 - PAGE DOWN 34
oFld:aDialogs[8]:bKeyDown := { | nKey | IF ( nKey = 33, ( Click(), ;
oFld:SetOption( 7 ), oFld:SetFocus(), oFld:Refresh() ), ;
IF ( nKey = 34, ( Click(), ;
oFld:SetOption( 9 ), oFld:SetFocus(), oFld:Refresh() ), ) ) }
// \SAMPLES\TESTPDAW.PRG - 17/09/2021.
#Include "FiveWin.ch"
FUNCTION PGDN_DAWN_ERRO()
LOCAL oDlg, oFld, oLbx, cAlias, cProve, oProve, cNombre, oNombre, ;
cProvincia, oProvincia
LOCAL nKey := VK_RETURN
USE Customer NEW SHARED
GO TOP
cAlias := ALIAS()
cProve := ( cAlias )->FIRST
cNombre := ( cAlias )->STREET
cProvincia := ( cAlias )->CITY
DEFINE DIALOG oDlg FROM 3, 3 TO 20, 70 TITLE "Teste de Page Dawn en GET"
oDlg:lHelpIcon := .F.
@ 10, 5 FOLDEREX oFld PIXEL PROMPT "&Proveedor", "&Datos mercancías" ;
SIZE 250, 100
@ 20, 5 SAY "Código:" OF oFld:aDialogs[1] SIZE 60, 10 PIXEL
@ 20, 100 SAY oProve var cProve OF oFld:aDialogs[1] SIZE 60, 10 PIXEL
@ 30, 5 SAY "Razón social" OF oFld:aDialogs[1] SIZE 60, 10 PIXEL
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
@ 30, 100 GET oNombre VAR cNombre OF oFld:aDialogs[1] SIZE 100, 10 PIXEL ;
VALID( VERIFY_PGDN_ERRO( cNombre, nKey ) )
oNombre:cToolTip := "PAGE DOWN no funciona asi?"
@ 40, 5 SAY "Provincia" OF oFld:aDialogs[1] SIZE 60, 10 PIXEL
@ 40, 100 GET oProvincia VAR cProvincia OF oFld:aDialogs[1] SIZE 100, 10 ;
PIXEL
@ 60, 50 BUTTON "&Grabar" OF oFld:aDialogs[1] SIZE 40, 10 PIXEL ;
ACTION( GRAVAR_CUSTOMER_NOW() )
@ 60, 150 BUTTON "&Salir" OF oFld:aDialogs[1] SIZE 40, 10 PIXEL ;
ACTION ( oDlg:End() ) CANCEL
ACTIVATE DIALOG oDlg CENTERED
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
RETURN NIL
FUNCTION GRAVAR_CUSTOMER_NOW()
? [Gravar Todo Aqui]
RETURN NIL
FUNCTION VERIFY_PGDN_ERRO( cCNombre, nKey )
// VK_NEXT PAGE DOWN key
IF GETASYNCKEY( VK_NEXT ) // NO FUNCIONA
? [NO FUNCIONA?]
RETURN( .T. )
ENDIF
DO CASE
CASE nKey = VK_END .OR. GETKEYSTATE( VK_NEXT ) // No funciona
? [NO FUNCIONA, PORQUE? ]
RETURN( .T. )
ENDCASE
IF GETASYNCKEY( VK_TAB ) // FUNCIONA
RETURN( .T. )
ENDIF
IF GETASYNCKEY( VK_UP )
RETURN( .F. )
ENDIF
IF GETASYNCKEY( VK_DOWN ) // FUNCIONA
RETURN( .T. )
ENDIF
IF EMPTY( cCNombre ) .AND. GETASYNCKEY( VK_RETURN ) // FUNCIONA.
? [Vacio e funciona]
RETURN( .T. )
ENDIF
RETURN( .F. )
// FIN
nY := 1
oDlg:bKeyDown := {|nKey| iif( nKey = 33, (nY:=iif(nY=4, 1, nY+1), oFld:SetOption(nY)), iif( nKey = 34, (nY:=iif(nY=1, 4, nY-1), oFld:SetOption(nY)),)) }
Euclides wrote:Ó Joãozinho...
Coloque isto abaixo do DEFINE DIALOG ... de ..\SAMPLES\TESTFOLD.PRG
- Code: Select all Expand view
nY := 1
oDlg:bKeyDown := {|nKey| iif( nKey = 33, (nY:=iif(nY=4, 1, nY+1), oFld:SetOption(nY)), iif( nKey = 34, (nY:=iif(nY=1, 4, nY-1), oFld:SetOption(nY)),)) }
Desculpe a brincadeira...
Euclides
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 80 guests