i dont understand you problem...
all bitmap paint correctly
1 have only 1 problem...
i cant use multiselect with brush and bmp
i can use other case with or without brush, mono or multi color row - col
i have idea with brush multiselect and bmp
Code: Select all | Expand
#include "FiveWin.ch"
#include "xbrowse.ch"
function main()
local oWnd1
local aBrw := array( 4 )
local aArray1 := {}
local nI
local oBrush
local oBrush2
define brush oBrush color GetSysColor( 13 )
define brush oBrush2 color GetSysColor( 5 )
for nI = 1 to 20
aadd( aArray1, { .f.,SPACE(20),;
"Row:"+StrZero(nI,2)+" Col:02",;
"Row:"+StrZero(nI,2)+" Col:03" } )
next
DEFINE window oWnd1 Title "Test Brush xBrowse"
aBrw[ 1 ]:= txbrowse():new( oWnd1 )
aBrw[ 1 ]:nRowHeight := 40
aBrw[ 1 ]:nColDividerStyle := LINESTYLE_BLACK
aBrw[ 1 ]:nRowDividerStyle := LINESTYLE_BLACK
aBrw[ 1 ]:SetArray( aArray1 )
aBrw[ 1 ]:nMarqueeStyle := 5
aBrw[ 1 ]:SetBackGround( "agua2.bmp" )
aBrw[ 1 ]:CreateFromCode()
aBrw[ 1 ]:aCols[ 2 ]:addbmpfile("print.bmp")
aBrw[ 1 ]:aCols[ 2 ]:addbmpfile("yes.bmp")
aBrw[ 1 ]:aCols[ 2 ]:bBmpData := {|| if( aBrw[ 1 ]:nArrayAt() % 2 == 0, 1, 2 ) }
aBrw[ 1 ]:aCols[ 3 ]:addbmpfile("gobottom.bmp")
aBrw[ 1 ]:aCols[ 3 ]:addbmpfile("gotop.bmp")
aBrw[ 1 ]:aCols[ 3 ]:bBmpData := {|| if( aBrw[ 1 ]:nArrayAt() % 2 == 0, 1, 2 ) }
aBrw[ 1 ]:aCols[ 1 ]:cHeader = "Selection"
aBrw[ 1 ]:aCols[ 1 ]:SetCheck( {"on.bmp","off.bmp"}, {|o,u| o:Value( u ) } )
aBrw[ 1 ]:aCols[ 1 ]:bStrData := {|| NIL }
//aBrw[ 1 ]:aCols[ 1 ]:lBmpTransparent := .f.
// comment this line for each case
for nI = 1 to 4
aBrw[ 1 ]:aCols[ nI ]:oBrush := {|| if ( aBrw[1]:aRow[ 1 ], oBrush, ) }//CreaBrush( aBrw[ 1 ], aBrw[ 1 ]:nArrayAt(),oBrush, oBrush2 )
// aBrw[ 1 ]:aCols[ nI ]:bClrStd := {|| if ( aBrw[ 1 ]:nArrayAt() %2 == 0,;
// { CLR_BLACK,RGB( 193,221,255 ) },;
// { CLR_BLACK,RGB( 221,245,255 ) } ) }
next
oWnd1:oClient = aBrw[ 1 ]
ACTIVATE window oWnd1
return nil

without brush row mono color
Code: Select all | Expand
#include "FiveWin.ch"
#include "xbrowse.ch"
function main()
local oWnd1
local aBrw := array( 4 )
local aArray1 := {}
local nI
local oBrush
local oBrush2
define brush oBrush color GetSysColor( 13 )
define brush oBrush2 color GetSysColor( 5 )
for nI = 1 to 20
aadd( aArray1, { .f.,SPACE(20),;
"Row:"+StrZero(nI,2)+" Col:02",;
"Row:"+StrZero(nI,2)+" Col:03" } )
next
DEFINE window oWnd1 Title "Test Brush xBrowse"
aBrw[ 1 ]:= txbrowse():new( oWnd1 )
aBrw[ 1 ]:nRowHeight := 40
aBrw[ 1 ]:nColDividerStyle := LINESTYLE_BLACK
aBrw[ 1 ]:nRowDividerStyle := LINESTYLE_BLACK
aBrw[ 1 ]:SetArray( aArray1 )
aBrw[ 1 ]:nMarqueeStyle := 5
//aBrw[ 1 ]:SetBackGround( "agua2.bmp" )
aBrw[ 1 ]:CreateFromCode()
aBrw[ 1 ]:aCols[ 2 ]:addbmpfile("print.bmp")
aBrw[ 1 ]:aCols[ 2 ]:addbmpfile("yes.bmp")
aBrw[ 1 ]:aCols[ 2 ]:bBmpData := {|| if( aBrw[ 1 ]:nArrayAt() % 2 == 0, 1, 2 ) }
aBrw[ 1 ]:aCols[ 3 ]:addbmpfile("gobottom.bmp")
aBrw[ 1 ]:aCols[ 3 ]:addbmpfile("gotop.bmp")
aBrw[ 1 ]:aCols[ 3 ]:bBmpData := {|| if( aBrw[ 1 ]:nArrayAt() % 2 == 0, 1, 2 ) }
aBrw[ 1 ]:aCols[ 1 ]:cHeader = "Selection"
aBrw[ 1 ]:aCols[ 1 ]:SetCheck( {"on.bmp","off.bmp"}, {|o,u| o:Value( u ) } )
aBrw[ 1 ]:aCols[ 1 ]:bStrData := {|| NIL }
aBrw[ 1 ]:aCols[ 1 ]:lBmpTransparent := .f.
// comment this line for each case
for nI = 1 to 4
// aBrw[ 1 ]:aCols[ nI ]:oBrush := {|| if ( aBrw[1]:aRow[ 1 ], oBrush, ) }
// aBrw[ 1 ]:aCols[ nI ]:bClrStd := {|| if ( aBrw[ 1 ]:nArrayAt() %2 == 0,;
// { CLR_BLACK,RGB( 193,221,255 ) },;
// { CLR_BLACK,RGB( 221,245,255 ) } ) }
aBrw[ 1 ]:aCols[ nI ]:bClrStd := {|| { CLR_BLACK,RGB( 193,221,255 ) } }
next
oWnd1:oClient = aBrw[ 1 ]
ACTIVATE window oWnd1
return nil

with multicolor row same result