how should header/footer painting changes for Metro be inserted.
I think we need a style like l2010.
Best regards,
Otto
- Code: Select all Expand view
- METHOD PaintHeader( hDC, aCols, nLast, hWhitePen, hGrayPen, hColPen ) CLASS TxBrowse
local nRow, nCol, oCol, nHeight, nBrwWidth, aGroup
local aColors
local nFor, nAt
local cGrpHdr, nGrpHt, nGrpFrom := 0
nBrwWidth := ::BrwWidth()
aColors := Eval( ::bClrHeader )
nRow := 0
nHeight := ::nHeaderHeight - 3 // Caution: Do not change -3 in a haste. This adjusts 3 pixels added in Adjust method
DrawHorz( hDC, nRow, 2, nBrwWidth, hWhitePen )
nRow++
DrawHorz( hDC, nRow, 2, nBrwWidth, hWhitePen )
nRow++
for nFor := 1 to nLast
nCol := aCols[ nFor ]
oCol := ::ColAtPos( nFor )
// DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hGrayPen )
// DrawVert( hDC, nCol - 1, nRow + 1, nRow + nHeight - 2, hWhitePen )
oCol:PaintHeader( nRow, nCol, nHeight, .f., hDC )
if oCol:cGrpHdr != cGrpHdr
cGrpHdr := oCol:cGrpHdr
if Empty( oCol:cGrpHdr )
nGrpFrom := 0
aGroup := nil
else
nGrpFrom := nCol
nGrpHt := oCol:nGrpHeight
nAt := AScan( ::aHeaderTop, { |a| a[ 3 ] == oCol:nPos } )
aGroup := If( nAt > 0, ::aHeaderTop[ nAt ], nil )
endif
endif
if nFor == nLast .or. oCol:cGrpHdr != ::ColAtPos( nFor + 1 ):cGrpHdr
if ! Empty( cGrpHdr )
// paint group header
oCol:PaintHeader( nRow, nGrpFrom, nHeight, .f., hDC, aCols[ nFor + 1 ] - nGrpFrom, ;
If( aGroup == nil, nil, aGroup[ 6 ] ) )
DrawHorz( hDC, nRow + nGrpHt, nGrpFrom - 2, aCols[ nFor + 1 ] - 2, hWhitePen )
endif
endif
next nFor
nCol := aCols[ nFor ]
// DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hGrayPen )
// DrawVert( hDC, nCol - 1, nRow + 1, nRow + nHeight - 2, hWhitePen )
DrawHorz( hDC, nRow + nHeight, 0, nBrwWidth - 2, hWhitePen )
return nil
//------------------------------------------------------------------//