FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrowse and bitmaps
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
xbrowse and bitmaps
Posted: 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

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
xbrowse and bitmaps
Posted: Thu Nov 13, 2008 03: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
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
xbrowse and bitmaps
Posted: Thu Nov 13, 2008 05: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:
   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
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
xbrowse and bitmaps
Posted: 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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
xbrowse and bitmaps
Posted: Fri Nov 14, 2008 04: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
xbrowse and bitmaps
Posted: Fri Nov 14, 2008 07: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

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
xbrowse and bitmaps
Posted: 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

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
xbrowse and bitmaps
Posted: 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,) }

Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
xbrowse and bitmaps
Posted: Mon Nov 17, 2008 05: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

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
xbrowse and bitmaps
Posted: Mon Nov 17, 2008 10:53 PM

How would you do it without an xbrowse array. Use a data base.

Thank you

Harvey

Continue the discussion