In 10.06 I can't.
- Code: Select all Expand view
//-- Objeto de recebimento --------------------------------------------//
oRecto := TRecebimento():New()
//-- xBrowse ----------------------------------------------------------//
oBrx := TXBrowse():New( oDlg )
oBrx:CreateFromResource( 301 )
oBrx:lHScroll := .T.
//-- oRecto:aTitulos is an array of objects
oBrx:SetArray( oRecto:aTitulos, .T. ,6, {5,6,3,9,10,21,22,8,16,23,27} )
xBrowseStyle(oBrx)
oBrx:nDataType := DATATYPE_ARRAY
oBrx:bKeyDown := {| nKey, nFlags | KeyDownDlg(nKey, nFlags)}
oBrx:bLDblClick := { || BtnClickMarcar() } //---------------> Duplo click
oBrx:bClrStd := { ||{CLR_BLACK,ClrPaneBrw()}} //---------------> Mudar cor de fundo
*****--- Colunas ---*****
oBrx:aCols[ 01 ]:cHeader := "Data emissao"
oBrx:aCols[ 01 ]:nDataStrAlign := AL_CENTER
oBrx:aCols[ 01 ]:nHeadStrAlign := AL_CENTER
oBrx:aCols[ 02 ]:cHeader := "Data vencimento"
oBrx:aCols[ 02 ]:nDataStrAlign := AL_CENTER
oBrx:aCols[ 02 ]:nHeadStrAlign := AL_CENTER
oBrx:aCols[ 03 ]:cHeader := "Título"
oBrx:aCols[ 03 ]:nDataStrAlign := AL_LEFT
oBrx:aCols[ 03 ]:nHeadStrAlign := AL_LEFT
oBrx:aCols[ 04 ]:cHeader := "Valor a pagar"
oBrx:aCols[ 04 ]:nDataStrAlign := AL_RIGHT
oBrx:aCols[ 04 ]:nHeadStrAlign := AL_RIGHT
oBrx:aCols[ 05 ]:cHeader := "Valor pago"
oBrx:aCols[ 05 ]:nDataStrAlign := AL_RIGHT
oBrx:aCols[ 05 ]:nHeadStrAlign := AL_RIGHT
oBrx:aCols[ 06 ]:cHeader := "Vr. original"
oBrx:aCols[ 06 ]:nDataStrAlign := AL_RIGHT
oBrx:aCols[ 06 ]:nHeadStrAlign := AL_RIGHT
oBrx:aCols[ 07 ]:cHeader := "Vr. devolvido"
oBrx:aCols[ 07 ]:nDataStrAlign := AL_RIGHT
oBrx:aCols[ 07 ]:nHeadStrAlign := AL_RIGHT
oBrx:aCols[ 08 ]:cHeader := "Retirado"
oBrx:aCols[ 08 ]:nDataStrAlign := AL_LEFT
oBrx:aCols[ 08 ]:nHeadStrAlign := AL_LEFT
oBrx:aCols[ 08 ]:nWidth := 170
oBrx:aCols[ 09 ]:cHeader := "Histórico"
oBrx:aCols[ 09 ]:nDataStrAlign := AL_LEFT
oBrx:aCols[ 09 ]:nHeadStrAlign := AL_LEFT
oBrx:aCols[ 09 ]:nWidth := 200
oBrx:aCols[ 10 ]:cHeader := "Vr. já pago"
oBrx:aCols[ 10 ]:nDataStrAlign := AL_RIGHT
oBrx:aCols[ 10 ]:nHeadStrAlign := AL_RIGHT
oBrx:aCols[ 11 ]:cHeader := "Dt. parcial"
oBrx:aCols[ 11 ]:nDataStrAlign := AL_RIGHT
oBrx:aCols[ 11 ]:nHeadStrAlign := AL_RIGHT
/* Sample */
CLASS TRecebimento
DATA nIdRecebimento AS NUMERIC INIT -1 PUBLIC
DATA cIdCliente AS CHARACTER INIT "" PUBLIC
DATA cIdVendedor AS CHARACTER INIT "" PUBLIC
DATA dData AS DATE INIT Date() PUBLIC
DATA aTitulos AS ARRAY INIT {} READONLY
DATA nJuros AS NUMERIC INIT 0 PUBLIC
DATA lJuros PUBLIC
DATA nTotalReceber AS NUMERIC INIT 0 PUBLIC
DATA cFileName AS NUMERIC INIT "" PUBLIC
DATA nPreRecebimento AS NUMERIC INIT 0 PUBLIC
DATA nTolerancia AS NUMERIC INIT 0 PUBLIC
DATA nDesconto AS NUMERIC INIT 0 PUBLIC
DATA nAcrescimo AS NUMERIC INIT 0 PUBLIC
DATA nIdDevolucao AS NUMERIC INIT 0 PUBLIC
DATA nMulta AS NUMERIC INIT 0 PUBLIC
DATA lMulta PUBLIC
CLASS TTitulo STATIC
//-- Acessado como matriz, adicionar atributos ao final. Obs.: Começa em 2
DATA nRecno AS NUMERIC INIT 0 PUBLIC // 02
DATA cIdTitulo AS CHARACTER INIT "" PUBLIC // 03
DATA nValor AS NUMERIC INIT 0 PUBLIC // 04
DATA dEmissao AS DATE INIT Date() PUBLIC // 05
DATA dVencimento AS DATE INIT Date() PUBLIC // 06
DATA dPagamento AS DATE INIT Date() PUBLIC // 07
DATA cRetirado AS CHARACTER INIT "" PUBLIC // 08
DATA nValorJuros AS NUMERIC INIT 0 PUBLIC // 09
DATA nValorPago AS NUMERIC INIT 0 PUBLIC // 10
DATA cIdVendedor AS CHARACTER INIT 0 PUBLIC // 11
DATA lEstorno AS NUMERIC INIT .F. PUBLIC // 12
DATA cIdRestanteConta AS CHARACTER INIT "" PUBLIC // 13
DATA nIdRecebimento AS NUMERIC INIT 0 PUBLIC // 14
DATA dEntrada AS DATE INIT Date() PUBLIC // 15
DATA cHistorico AS CHARACTER INIT "" PUBLIC // 16
DATA cOperador AS CHARACTER INIT "" PUBLIC // 17
DATA cTpLanca AS CHARACTER INIT "" PUBLIC // 18
DATA nJuros AS NUMERIC INIT 0 PUBLIC // 19
DATA cCodRetirado AS CHARACTER INIT '' PUBLIC // 20
DATA nVrOriginal AS NUMERIC INIT 0 PUBLIC // 21
DATA nVrDevolucao AS NUMERIC INIT 0 PUBLIC // 22
DATA nVrRecebido AS NUMERIC INIT 0 PUBLIC // 23
DATA nIdDevolucao AS NUMERIC INIT 0 PUBLIC // 24
DATA nPerMulta AS NUMERIC INIT 0 PUBLIC // 25
DATA cFlagRec AS CHARACTER INIT "" PUBLIC // 26
DATA dDtParcial AS DATE INIT Date() PUBLIC // 27