FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse how to use BACKGROUND and cellcolors
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
xBrowse how to use BACKGROUND and cellcolors
Posted: Wed Feb 20, 2019 01:51 PM
It seems :bClrStd doesn't work using xbrowse BACKGROUND



I added a abrush to a original from the sample-folder

@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE aData ;
COLUMNS 2,3,4,5,6, 7 ;
HEADERS "DATE", "DETAILS", "QUANTITY", "RATE", "AMOUNT", Transform( nOpgBal, NumPict( 10, 2 ) ) ;
PICTURES nil, nil, "9999.999", "$ 999.99", '$ ' + NumPict( 7, 2 ), '$ ' + NumPict( 7, 2 ) ;
CELL FOOTERS NOBORDER STYLE FLAT ;
BACKGROUND "..\bitmaps\backgrnd\Marble.bmp"



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: xBrowse how to use BACKGROUND together with :bClrStd ?
Posted: Fri Feb 22, 2019 09:30 PM
any solution :-)

I tested a solution to define a background color
that works with a defined column :bClrStd

Code (fw): Select all Collapse
  
// oSystem:Color = DBF-field for 9 defined colors
// building the cell-gradient
oBrw:aCols[ 2 ]:bClrStd := {|| { , { { .5, oSystem:Color, nRGB( 255, 255, 255 ) }, ;
       { .5, nRGB( 255, 255, 255 ), oSystem:Color } } } }

WITH OBJECT oBrw
     :bClrStd := { || { , nRGB( 120, 187, 221 ) } } // light blue background
END

or :

REDEFINE XBROWSE oBrw1 ID 110 of oDlg1  ;
DATASOURCE oSystem ; 
...
... ;
COLOR 0, 16639174


but I couldn't define a gradient, brush or image background.



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: xBrowse how to use BACKGROUND comb. with :aCols[2]:bClrStd
Posted: Mon Mar 11, 2019 12:18 PM
No solution for the problem :-)

Needed :
a combination of xbrowse background-brush and using column :bclrstd

( photo-assembly from colored background)



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: xBrowse how to use BACKGROUND comb. with :aCols[2]:bClrStd
Posted: Tue Mar 19, 2019 11:30 PM
In the meantime I'm using a solution testing 3 different styles
and working on a defined xbrowse background.

1. Full cell-color + defined 2. color-area
2. cell-color-area on xbrowse-brush
3. full cellsize-color

defined vertical textposition
images are centered and resized keeping the aspect ratio



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 883
Joined: Tue Oct 11, 2005 11:57 AM
Re: xBrowse how to use BACKGROUND and cellcolors
Posted: Mon Apr 22, 2019 03:51 PM

Uwe.

A question, how did you do to put different backgrounds colors on a column, I can do it with only 2 options, I see you use a variety of them.

Any idea, sample will be appreciated.

Thanks in advance

From Chile
Adolfo

;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: xBrowse how to use BACKGROUND and cellcolors
Posted: Mon Apr 22, 2019 07:41 PM
Adolfo,

how did you do to put different backgrounds colors on a column,
I can do it with only 2 options, I see you use a variety of them.


shows how to define cell-colors for different age-groups

Code (fw): Select all Collapse
// defined colum for ( oBrw:cAlias )->AGE 
oBrw:aCols[ 4 ]:bClrStd := {|| PAINT_CELL(oBrw) } 

// ---------

STATIC FUNCTION PAINT_CELL(oBrw)
LOCAL aColors := { CLR_BLACK, CLR_WHITE } // basic color

IF ( oBrw:cAlias )->AGE < 30
    aColors := { CLR_BLACK, CLR_HRED }
ELSEIF ( oBrw:cAlias )->AGE >= 30 .and. ( oBrw:cAlias )->AGE < 50
        aColors := { CLR_BLACK, CLR_YELLOW }
ELSEIF ( oBrw:cAlias )->AGE >= 50 .and. ( oBrw:cAlias )->AGE < 60
        aColors := { CLR_WHITE, CLR_HBLUE }
ELSEIF ( oBrw:cAlias )->AGE >= 60  
        aColors := { CLR_BLACK, CLR_HGREEN }
ENDIF

RETURN aColors




regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 883
Joined: Tue Oct 11, 2005 11:57 AM
Re: xBrowse how to use BACKGROUND and cellcolors
Posted: Tue Apr 23, 2019 03:28 PM

Thanks UWE, simple, I didn`t figure it out.

Thanks again.

Grettings

From Chile
Adolfo

;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650

Continue the discussion