estou usando o oBrw:bkeyDown na TxBrowse e não tá pegando a Tecla ESC
Ari
WITH OBJECT ( oBrw := TXBrowse():new( oDlg ) )
:CreateFromResource( 101 )
:cAlias := "CONT"
:nColDividerStyle := LINESTYLE_DARKGRAY
:lColDividerComplete := TRUE
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:lAllowRowSizing := FALSE
:lRecordSelector := TRUE
:nHeaderHeight := 30
:bClrHeader := { || { CLR_BLUE, GetSysColor( COLOR_BTNFACE ) } }
:bLDblClick := { || Contratos_Editar(FALSE) }
:bKeyChar := { |nKey| Msginfo(nKey),Browse_OnKeyCharPress(nKey,TRUE,oBrw) }
:bKeyDown := { |nKey| Msginfo(nKey),Contratos_ProcesarTecla(nKey)}
:nFreeze := 3
:lFooter := TRUE
/*redefine columnas del browse*/
WITH OBJECT ( oCol := :AddCol() )
:cHeader := "Contrato No."
:bStrData := {|| CONT->MC_CODCON }
:nWidth := 90
END
PROCEDURE Browse_OnKeyCharPress(nKey,lUpperSeek,oBrw)
LOCAL oGet
LOCAL cGet
LOCAL oDlgS
LOCAL cChar
LOCAL lOldSeek := SET( _SET_SOFTSEEK, TRUE )
DEFAULT lUpperSeek := TRUE
IF nKey < 32
RETURN
ENDIF
IF lUpperSeek
cGet := PadR( Upper( Chr(nKey) ),30 )
ELSE
cGet := PadR( Chr(nKey), 30 )
ENDIF
DEFINE DIALOG oDlgS NAME "DLG_BUSCAR" OF oDlg
REDEFINE GET oGet VAR cGet ID 101 OF oDlgS
REDEFINE BUTTONBMP ID 201 OF oDlgS BITMAP "SBOK" ACTION Browse_Buscar( cGet, oDlgS, oBrw )
oGet:cPicture := iif( lUpperSeek, "@!", NIL )
ACTIVATE DIALOG oDlgS ON INIT oGet:SetPos(2)
SET( _SET_SOFTSEEK, lOldSeek )
RETURN
PROCEDURE Browse_Buscar( cGet, oDlgS, oBrw )
LOCAL nRecno := (oBrw:cAlias)->( RecNo() )
cGet := RTrim( cGet )
IF !Empty( cGet )
IF !(oBrw:cAlias)->( DBSeek( cGet ) )
(oBrw:cAlias)->( DBGoTo( nRecno ) )
ENDIF
oBrw:refresh()
Tone( 600, 3 )
ENDIF
oDlgS:end()
RETURN
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 61 guests