xBrowse how to use BACKGROUND and cellcolors

xBrowse how to use BACKGROUND and cellcolors

Postby ukoenig » Wed Feb 20, 2019 1:51 pm

It seems :bClrStd doesn't work using xbrowse BACKGROUND

Image

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"

Image

regards
Uwe :?:
Last edited by ukoenig on Mon Apr 22, 2019 7:48 pm, edited 6 times in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: xBrowse how to use BACKGROUND together with :bClrStd ?

Postby ukoenig » Fri Feb 22, 2019 9:30 pm

any solution :?:

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

Code: Select all  Expand view  RUN
 
// 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.

Image

regards
Uwe :(
Last edited by ukoenig on Wed Mar 13, 2019 11:13 am, edited 1 time in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: xBrowse how to use BACKGROUND comb. with :aCols[2]:bClrStd

Postby ukoenig » 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)

Image

regards
Uwe :(
Last edited by ukoenig on Mon Apr 22, 2019 4:41 pm, edited 1 time in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: xBrowse how to use BACKGROUND comb. with :aCols[2]:bClrStd

Postby ukoenig » 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

Image

regards
Uwe :D
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: xBrowse how to use BACKGROUND and cellcolors

Postby Adolfo » Mon Apr 22, 2019 3: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
User avatar
Adolfo
 
Posts: 860
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile

Re: xBrowse how to use BACKGROUND and cellcolors

Postby ukoenig » Mon Apr 22, 2019 7: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: Select all  Expand view  RUN


// 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

 


Image

regards
Uwe :D
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: xBrowse how to use BACKGROUND and cellcolors

Postby Adolfo » Tue Apr 23, 2019 3: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
User avatar
Adolfo
 
Posts: 860
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 48 guests