what's the best way to put a bitmap from a resource file on an xbrowse column?
I can't seem to find this exact example.
Don Lowenstein
www.laapc.com
www.laapc.com
what's the best way to put a bitmap from a resource file on an xbrowse column?
I can't seem to find this exact example.
Don,
Try this:
oCol:AddResource( "resname" )
oCol:bBmpData := { || 1 }
oCol:bStrData := { || nil }
oLbx:aCols[1]:nHeadStrAlign := 2 //texto centrado
oLbx:aCols[1]:nDataStrAlign := 2 //texto centrado
oLbx:aCols[1]:cHeader:="Mesa"
oLbx:aCols[1]:AddResource( "Document_24" )
oLbx:aCols[1]:AddResource( "Emo_Alegre" )
oLbx:aCols[1]:bBmpData := {|| if(oLbx:nArrayAt=1, 2,1) }
oLbx:aCols[1]:lBmpStretch := .t.
oLbx:aCols[1]:lBmpTransparent := .T.
oLbx:aCols[1]:nDataBmpAlign := AL_LEFT
oLbx:aCols[1]:nWidth := 60Since version 10.08, we can use
oCol:AddBitmap( cResourceOrBmpFileName )
or
oCol:AddBitmap( aArrayOfResourcesOrBmpFileNames )
in a single call,
instead of calling oCol:AddResource( cRes ) and oCol:AddBmpFile( cBmpFile ) multiple times.
oLbx:aCols[1]:AddResource( "Document_24" )
oLbx:aCols[1]:AddResource( "Emo_Alegre" )
can be written as
oLbx:aCols[1]:AddBitmap( { "Document_24", "Emo_Alegre" } )
Rao,
Yes, I changed my code.
Thanks.