xbrowse and bitmaps

xbrowse and bitmaps

Postby Marc Vanzegbroeck » Thu Nov 13, 2008 11:00 am

Hi,

Is it possble to have a bitmap as background in a xbrowse-cell.
If I add now a bitmap to a cell, the bitmap is on the left-site, and my text is located right next to the bitmap.

Is this the problem because I have still FWH7.10?

Thanks,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby nageswaragunupudi » Thu Nov 13, 2008 3:04 pm

>
Is it possble to have a bitmap as background in a xbrowse-cell.
>

yes. but perhaps not with 7.10
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby Marc Vanzegbroeck » Thu Nov 13, 2008 5:32 pm

How is this done, so I can verify if this is already implemented in 7.10.

Is it like the testxbrw.prg example:
Code: Select all  Expand view
   oCol := oBrw:AddCol()
   oCol:AddResource("GREEN")
   oCol:AddResource("RED")
   oCol:cHeader  := "Married"
   oCol:bBmpData   := { || iif( _FIELD->Married, 1, 2) }
   oCol:bStrData   := { || iif( _FIELD->Married, "Yes", "No ")}


Thanks,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby nageswaragunupudi » Fri Nov 14, 2008 12:54 pm

By assigning a brush object or a codeblock returning brush object to oCol:oBrush
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby James Bott » Fri Nov 14, 2008 4:23 pm

Marc,

If you just want a solid color as the background, try something like this:

oCol:bClrStd := {|| {CLR_BLUE, If( _FIELD->MARRIED,CLR_GREEN,CLR_RED)} }

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Marc Vanzegbroeck » Fri Nov 14, 2008 7:20 pm

James,

Setting a solid color is not the problem. I already did that. I want to have a (transparant) bitmap + solid color + text, like the 16bit program that I have now (see screenshot).
The solod color is to show the status (not started,in progress,done,..) and the bitmab to create the frame to show the items that belong together.
The 16 bit was created with TSBROWSE instead of TXBROWSE.

NageswaraRao, do you have an example to do that?

Thanks,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Marc Vanzegbroeck » Mon Nov 17, 2008 11:14 am

Hi,

Is it possible to have an example to set a bitmap as background in a cell?

Thanks,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Daniel Garcia-Gil » Mon Nov 17, 2008 12:25 pm

you can use oBrush data from TXBrwColumn class into txbrowse, that code block...

DEFINE BRUSH oBrush file "BitmapName.bmp"

for array data in xbrowse

oBrw:aCols[ 2 ]:oBrush := {|| if ( oBrw:aRow[ 1 ] == 3, oBrush,) }

for alias data

oBrw:aCols[ 2 ]:oBrush := {|| if ( dbf->field_one == 3, oBrush,) }

Image
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Postby Marc Vanzegbroeck » Mon Nov 17, 2008 5:19 pm

Thanks for the example.

I think I have to upgrade my FWH-version. Obrush is not working in my version of xBrowse.

Regards,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby hag » Mon Nov 17, 2008 10:53 pm

How would you do it without an xbrowse array. Use a data base.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 101 guests