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.
XBROWSE bitmaps from resource
- don lowenstein
- Posts: 196
- Joined: Mon Oct 17, 2005 9:09 pm
- Contact:
XBROWSE bitmaps from resource
Don Lowenstein
www.laapc.com
www.laapc.com
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: XBROWSE bitmaps from resource
Don,
Try this:
oCol:AddResource( "resname" )
oCol:bBmpData := { || 1 }
oCol:bStrData := { || nil }
Try this:
oCol:AddResource( "resname" )
oCol:bBmpData := { || 1 }
oCol:bStrData := { || nil }
- FranciscoA
- Posts: 1964
- Joined: Fri Jul 18, 2008 1:24 am
- Location: Chinandega, Nicaragua, C.A.
Re: XBROWSE bitmaps from resource
Hi, here other way:
Regards.
Code: Select all
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 := 60
Francisco J. Alegría P.
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: XBROWSE bitmaps from resource
Since 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" } )
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" } )
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- FranciscoA
- Posts: 1964
- Joined: Fri Jul 18, 2008 1:24 am
- Location: Chinandega, Nicaragua, C.A.
Re: XBROWSE bitmaps from resource
Rao,
Yes, I changed my code.
Thanks.
Yes, I changed my code.
Thanks.
Francisco J. Alegría P.
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql