extendamos un poco xbrowse agregando una data cFooterPicture a la clase txbrwcolumn
y modifiquemos el metodo FooterStr a la clase txbrwcolumn
y ya tenemos un picture definible para cada footer.
probado con harbour y xharbour
ejemplo de uso
WITH OBJECT oBrw
:aCols[ 03 ]:cFooter := "Total C$:"
:aCols[ 06 ]:cFooterPicture := "(999,999.99)" //ejemplo
:aCols[ 06 ]:nFooterType := AGGR_SUM
END
EXTEND CLASS TXBRWCOLUMN WITH DATA cFooterPicture
OVERRIDE METHOD FooterStr IN CLASS TXBRWCOLUMN WITH KFooterStr
FUNCTION KFooterStr()
LOCAL Self := HB_QSelf()
local cFooter := "", cType
if ::bFooter != nil
cFooter := Eval( ::bFooter, Self )
DEFAULT cFooter := ""
elseif ::nTotal != nil .or. ! Empty( ::nFooterType )
DEFAULT ::nFooterType := AGGR_SUM, ::nTotal := 0.0
if ::nFooterType >= AGGR_STD
if ::nCount > 0
cFooter := ::nTotalSq - ( ::nTotal * ::nTotal / ::nCount )
cFooter /= ::nCount - If( ::nFooterType == AGGR_STDEVP, 0, 1 )
cFooter ^= 0.5
else
cFooter := 0
endif
elseif ::nFooterType == AGGR_AVG
cFooter := If( ::nCount > 0, ::nTotal / ::nCount, 0 )
elseif ::nFooterType == AGGR_COUNT
cFooter := ::nCount
else
cFooter := ::nTotal
endif
elseif ::cFooter != nil
cFooter := ::cFooter
endif
cType := ValType( cFooter )
if cType != 'C'
if cType == ::cDataType .and. ::cEditPicture != nil
cFooter := cValToStr( cFooter, IIf( ::cFooterPicture==NIL, ::cEditPicture, ::cFooterPicture ),, ;
IfNil( ::lDisplayZeros, ::oBrw:lDisplayZeros ) )
else
cFooter := cValToChar( cFooter )
endif
endif
return cFooter