Xbrowse header's sort bitmap
Posted: Sun Apr 06, 2014 4:10 pm
Hello,
a suggestion when we don't need or don't like to show the sort bitmap in the xbrowse's columns, we can add a
then in the xBrowse sorce
In new Method add IF...
In destroy Method add IF ...
In METHOD HeaderWidth CLASS TXBrwColumn modify
Finally
In METHOD PaintHeader CLASS TXBrwColumn Modify
I hope Fivetech can evaluate this modifications
regards
Marcelo
a suggestion when we don't need or don't like to show the sort bitmap in the xbrowse's columns, we can add a
Code: Select all
DATA lSortBmp INIT .T.
In new Method add IF...
Code: Select all
IF ::lSortBmp
hBmp := FWBmpAsc()
AAdd( ::aSortBmp, { hBmp, 0, nBmpWidth( hBmp ), nBmpHeight( hBmp ), nil, .F. } )
hBmp := FWBmpDes()
AAdd( ::aSortBmp, { hBmp, 0, nBmpWidth( hBmp ), nBmpHeight( hBmp ), nil, .F. } )
ENDIF
Code: Select all
IF ::lSortBmp
DeleteObject( ::aSortBmp[ 1 ][ 1 ] )
DeleteObject( ::aSortBmp[ 2 ][ 1 ] )
ENDIF
Code: Select all
if ! Empty( aBitmap := ::aBitmap( If( ValType( ::nHeadBmpNo ) == 'B', Eval( ::nHeadBmpNo ), ::nHeadBmpNo ) ) )
nWidth += aBitmap[ BITMAP_WIDTH ] + BMP_EXTRAWIDTH
elseif ! Empty( ::cSortOrder )
nWidth += IF( ::oBrw:lSortBmp, ::oBrw:aSortBmp[ 1 ][ BITMAP_WIDTH ], 0 ) + BMP_EXTRAWIDTH // MVG
endif
In METHOD PaintHeader CLASS TXBrwColumn Modify
Code: Select all
if ! Empty( ::cOrder ) .AND. ::oBrw:lSortBmp
aBitmap := ::oBrw:aSortBmp[ If( ::cOrder == 'A', 1, 2 ) ]
nBmpAlign := AL_RIGHT
elseif !Empty( aBitmap := ::aBitmap( nBmpNo ) )
nBmpAlign := ::nHeadBmpAlign
endif
regards
Marcelo