I added the sample xBrowsetree to my sample-collector.
trying to add a bitmap on column 1 with
WITH OBJECT oBrw3:aCols[ 1 ]
:AddBmpFile( c_Path1 + "Open2.bmp" )
:bBmpData := 1
END
on column 1, doesn't work.
Using column 2, it is OK
- Code: Select all Expand view
// ------------------------------------------------------------------ SECTION 1 Page 4
FUNCTION SS1_PART4( oFld1, nSavePage )
LOCAL aRowGrad1, aRowGrad2, aSelGrad
aRowGrad1 := { { .5, nRGB( 120, 187, 221 ), nRGB( 255, 255, 255 ) }, ;
{ .5, RGB( 232, 241, 252 ), nRGB( 120, 187, 221 ) } }
aRowGrad2 := { { .5, nRGB( 128, 255, 192 ), nRGB( 255, 255, 255 ) }, ;
{ .5, nRGB( 255, 255, 255 ), nRGB( 128, 255, 192 ) } }
aSelGrad := { { .5, 14540253, nRGB( 255, 255, 255 ) }, ;
{ .5, nRGB( 255, 255, 255 ), 14540253 } }
DBSELECTAREA( "CUST" )
INDEX ON Field->State TO State
SET ORDER TO "State"
Cust->(DBGOTOP())
@ 10, 20 XBROWSE oBrw3 SIZE -20, -152 PIXEL OF oFld1:aDialogs[4] LINES CELL ;
DATASOURCE "CUST" FONT oFont
oBrw3:SetTree( BuildTree(), { "open", "close", "go" } )
ADD TO oBrw3 DATA oBrw3:oTreeItem:Cargo[ 1 ] HEADER "Last"
ADD TO oBrw3 DATA oBrw3:oTreeItem:Cargo[ 2 ] HEADER "First"
oBrw3:aCols[ 1 ]:bToolTip := { | oBrw, nRow, nCol, nFlags | "Mouseclick" + CRLF + ;
"___________" + CRLF + ;
"to create the" + CRLF + ;
"xBrowse-tree " }
oBrw3:nMarqueeStyle = MARQSTYLE_HIGHLROW
WITH OBJECT oBrw3
:nRecSelColor := 16762251
:bClrStd := { || If( oBrw3:KeyNo() % 2 == 0, ;
{ If( ( oBrw3:cAlias )->( Deleted() ), 255, CLR_BLACK ), aRowGrad1 }, ;
{ If( ( oBrw3:cAlias )->( Deleted() ), 255, CLR_BLACK ), aRowGrad2 } ) }
:bClrSel := ;
:bClrSelFocus := { || { If( ( oBrw3:cAlias )->( Deleted() ), 255, CLR_BLACK ), aSelGrad } }
:bClrHeader := { || { 255, 16777088 } }
:nRecSelHeadBmpNo := c_Path1 + "Counter.bmp"
END
// DOESN*T WORK !!!
WITH OBJECT oBrw3:aCols[ 1 ]
:AddBmpFile( c_Path1 + "Open2.bmp" )
:bBmpData := 1
END
// OK
WITH OBJECT oBrw3:aCols[ 2 ]
:AddBmpFile( c_Path1 + "Open2.bmp" )
:bBmpData := 1
END
oBrw3:CreateFromCode()
oBrw3:aCols[ 1 ]:cHeader = "State & City"
RETURN NIL
regards
Uwe