FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBROWSE bitmaps from resource
Posts: 204
Joined: Mon Oct 17, 2005 09:09 PM
XBROWSE bitmaps from resource
Posted: Tue Mar 19, 2013 08:34 PM

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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: XBROWSE bitmaps from resource
Posted: Tue Mar 19, 2013 09:31 PM

Don,

Try this:

oCol:AddResource( "resname" )
oCol:bBmpData := { || 1 }
oCol:bStrData := { || nil }

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: XBROWSE bitmaps from resource
Posted: Wed Mar 20, 2013 12:17 AM
Hi, here other way:

Code (fw): Select all Collapse
 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


Regards.
Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE bitmaps from resource
Posted: Wed Mar 20, 2013 08:08 AM

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" } )

Regards



G. N. Rao.

Hyderabad, India
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: XBROWSE bitmaps from resource
Posted: Wed Mar 20, 2013 02:10 PM

Rao,
Yes, I changed my code.
Thanks.

Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql

Continue the discussion