Hello ,
Is it possible to have SetProgBar in Total row ?
Regards MAurizio
Maurizio
www.nipeservice.com
www.nipeservice.com
Hello ,
Is it possible to have SetProgBar in Total row ?
Regards MAurizio
I could not understand your exact requirement.
SetProgBar: What kind of progress bar do you want to show? Progress of what action?
Total Row: Do you mean footer ?
The link appears to be broken. Could not see the image please.
SetProgBar is not implemented for the total in the footer row.
If we need to paint any dynamic graphics on the footer we need to modify the method paintfooter. The best way of implementation is to have a derived class and use the same for browse(s) that need to use this feature.
Thank

/ Class TXBrwColumn
// FOOTBAR
DATA lFootBar AS LOGICAL INIT .f.
DATA bFootClrProg INIT { || { RGB(200,200,255), CLR_YELLOW } }
DATA nFootProgTot INIT 1 // can be codeblock also
METHOD SetFootBar(nFootProgTotal, nFootWidth, bFootClrProg )
METHOD SetFootBar( nFootProgTotal, nFootWidth, bFootClrProg ) CLASS TXBrwColumn
::lFootBar := .t.
if nFootProgTotal != nil
::nFootProgTot := nFootProgTotal
endif
if ValType( bFootClrProg ) == 'B'
::bFootClrProg := bFootClrProg
endif
::nFootStyle := DT_CENTER
if nFootWidth != nil
::nWidth := nFootWidth
endif
return nil
In METHOD PaintFooter( nRow, nCol, nHeight, lInvert ) CLASS TXBrwColumn
local oBrush1, oBrush2, hBrush1, hBrush2, aColor2, nWidth1
Line 90494 of FW 1106
After
nHeight -= ROW_EXTRAHEIGHT
Before
if !Empty( aBitmap := ::aBitmap( nBmpNo ) )
//---------------------------------------------------------
if ::lFootBar
aColor2 := Eval( ::bFootClrProg )
hBrush1 := CreateColorBrush( aColor2[ 1 ] )
hBrush2 := CreateColorBrush( aColor2[ 2 ] )
nWidth1 := Min( val(cFooter) * nWidth / ;
Max( 1, If( ValType( ::nFootProgTot ) == 'B', Eval( ::nFootProgTot, Self ), ::nFootProgTot ) ), ;
nWidth )
FillRect( hDC, { nRow, nCol, nRow + nHeight, Min( nCol + nWidth1, ::oBrw:BrwWidth() - 4 ) }, hBrush1 )
if nCol + nWidth1 < ::oBrw:BrwWidth() - 4
FillRect( hDC, { nRow, nCol + nWidth1 + 1, nRow + nHeight, ;
Min( nCol + nWidth, ::oBrw:BrwWidth() - 4 ) }, hBrush2 )
endif
DeleteObject( hBrush1 )
DeleteObject( hBrush2 )
endif