METHOD browser()
LOCAL oDlg, ;
oBrw, ;
oFont, ;
oFont1, ;
oGet, ;
vGet, ;
this := Self
DEFINE FONT oFont NAME "TAHOMA" SIZE 0, - 12
DEFINE FONT oFont1 NAME "TAHOMA" SIZE 0, - 12 bold
vGet := .F.
::cargaQuery( vGet )
DEFINE DIALOG oDlg resource "BRWAGENTE" TITLE ".:Nomina de moviles:."
REDEFINE checkbox oGet VAR vGet ID 110 OF oDlg
oBrw := TXBROWSE():new( oDlg )
oBrw:setdolphin( ::oQry, .T., .T., { "id", "patente", "obs" } )
WITH OBJECT oBrw
:bClrStd := { || IF( oBrw:KeyNo() % 2 == 0, ;
{ CLR_BLACK, RGB( 255, 255, 217 ) }, ;
{ CLR_BLACK, RGB( 204, 255, 168 ) } ) }
:bClrSel := { || { 0, nRGB( 155, 201, 210 ) } }
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:nRowHeight := 22
:lRecordSelector := .F.
:lColDividerComplete := .F.
:nRowDividerStyle := 4
:nStretchCol := STRETCHCOL_LAST
:nColDividerStyle := 4
:nHeaderHeight := 24
WITH OBJECT :aCols[ 2 ]
:oheaderfont := oFont1
:odatafont := oFont
:cHeader := "Patente"
:nHeadStrAlign := AL_CENTER
:nWidth := 100
:nDataStrAlign := AL_LEFT
END WITH
WITH OBJECT :aCols[ 3 ]
:oheaderfont := oFont1
:odatafont := oFont
:cHeader := "Observaciones"
:nHeadStrAlign := AL_CENTER
:nWidth := 100
:nDataStrAlign := AL_LEFT
END WITH
END WITH
oBrw:aCols[ 1 ]:hide()
oBrw:aCols[ 2 ]:SETorder()
oBrw:bKeychar := { | nkey | IF( nKey == VK_ESCAPE, ( ::aRespuesta := NIL, oDlg:END() ), nKey ) }
oBrw:bKeyDown := { | nkey | IIf( ::ctrl( nKey, oBrw ), oDlg:END(), ) }
oBrw:blDBlClick := { | nkey | IIf( ::ctrl( VK_RETURN, oBrw ), oDlg:END(), ) }
AEval( oBrw:aCols, { | o | o:bRClickHeader := { || NIL } } )
oBrw:CreateFromResource( 100 )
oDlg:oclient := oBrw
//----------( )----------
oGet:bchange := { || ::cargaQuery( vGet ), oBrw:refresh() }
ACTIVATE DIALOG oDlg CENTERED
RETURN ( NIL )