Antonio:
Viendo la necesidad de un colega del foro referente a presentar un solo footer de la anchura del oBrw en la clase TWBrowse, hice un leve cambio en la TXBrowse para obtener el mismo resultado (footer sin divisores de columnas). Aquí el código:
http://img78.imageshack.us/my.php?image=footersindivisordecolumfv4.png
DATA lFooterColDivider
En el METHOD NEW
...
::lHeader := .t.
::lFooter := .f.
::lRefreshOnlyData := .f.
::lFooterColDivider := .t. //FranciscoA Ene/01/2008: Footer con divisor, o no, de columnas.
En el METHOD PAINT
...
/*
Paint Footer
*/
if ::lFooter
if !lOnlyData
nHeight := ::nFooterHeight - 3
nRow := nBrwHeight - ::nFooterHeight
aColors := Eval( ::bClrFooter )
//Pinta linea para los bordes del footer
MoveTo( hDC, 0, nRow)
LineTo( hDC, nBrwWidth, nRow, hGrayPen )
nRow++
MoveTo( hDC, 0, nRow )
LineTo( hDC, nBrwWidth, nRow, hWhitePen )
nRow++
MoveTo( hDC, 0, nRow + nHeight)
LineTo( hDC, nBrwWidth, nRow + nHeight , hGrayPen )
hBrush := CreateSolidBrush( aColors[ 2 ] )
FillRect( hDC, {nRow, 0, nRow + nHeight, nBrwWidth}, ::hBrushRecSel ) // hBrush )
DeleteObject( hBrush )
for nFor := 1 to nLast
nCol := aCols[ nFor ]
oCol := ::ColAtPos( nFor )
IF !::lFooterColDivider //FranciscoA Ene/01/2009 //Pintar o no divisores de cols en el footer
if nFor == 1
nCol := aCols[ nFor ]
oCol := ::ColAtPos( nFor )
MoveTo( hDC, nCol - 2, nRow + 1 )
LineTo( hDC, nCol - 2, nRow + nHeight - 2, hGrayPen )
MoveTo( hDC, nCol - 1, nRow + 1 )
LineTo( hDC, nCol - 1, nRow + nHeight - 2, hWhitePen )
endif
ELSE //Original
MoveTo( hDC, nCol - 2, nRow + 1 )
LineTo( hDC, nCol - 2, nRow + nHeight - 2, hGrayPen )
MoveTo( hDC, nCol - 1, nRow + 1 )
LineTo( hDC, nCol - 1, nRow + nHeight - 2, hWhitePen )
ENDIF
oCol:PaintFooter( nRow, nCol, nHeight ) //Pinta footer de cada col.
next
nCol := aCols[ nFor ] //ultimo divisor de col
MoveTo( hDC, nCol - 2, nRow + 1 )
LineTo( hDC, nCol - 2, nRow + nHeight - 2, hGrayPen )
MoveTo( hDC, nCol - 1, nRow + 1 )
LineTo( hDC, nCol - 1, nRow + nHeight - 2, hWhitePen )
endif
nLastRow -= ::nFooterHeight
endif
/*
Paint cols data
*/
USO:
oBrw:lFooterColDivider := .f. //FranciscoA Ene/01/2008: poner o no, divisor de cols en el footer
Espero sea de utilidad para otros usuarios.
Saludos.
Francisco J. Alegría P.
Chinandega, Nicaragua.