FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Possible to change gradient-directions in xBrowse ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Possible to change gradient-directions in xBrowse ?
Posted: Wed Oct 30, 2019 08:41 PM
Hello,

is it possible to use bColorstd of xBrowse to build a gradient of columns ( 3D-loook ) in different direction ?
The column < button > shows the normal painting.
It is a matter of taste, but I think it looks much better.



best 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: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Possible to change gradient-directions in xBrowse ?
Posted: Wed Oct 30, 2019 10:47 PM
Yes
Please try this way:
Code (fw): Select all Collapse
oBrw:aCols[ n ]:bClrStd := { || { CLR_BLACK, {{ 0.5, nClr1,nClr2 },{0.5, nClr2,nClr1}, .F. } } }

If the last element of the gradient array is not an array but logical .T. is vertical and .F. is horizontal,
Regards



G. N. Rao.

Hyderabad, India
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Possible to change gradient-directions in xBrowse ?
Posted: Thu Oct 31, 2019 10:42 AM
Thank You very much.
It works with the same syntax like the normal gradientdesign.
Is there maybe a solution to protect a cell from to be covered from the focused rowcolor
to keep the cellcolor / gradient visible like used for images ?



or drawing a rowborder using :

:nMarqueeStyle := 0
:lRowBox := .T.
:nColorBox := 255
:nBoxPen := 5

( would be perfect with a defined pensize )



I changed some lines in xBrowse line 2995

a new data := DATA nBoxpen INIT 1
I added a value of 3
Code (fw): Select all Collapse
DATA nBoxPen INIT 1

if ::lRowBox .and. nStyle != 7
     oCol := ::ColAtPos( nLast )
     nLast := Min( oCol:nDisplayCol + oCol:nWidth - 1, ::GridWidth() - 3 )
     RoundBox( hDC, If( ::lRecordSelector, ::nRecSelWidth, 1 ), nRow +1, ;
                     nLast, nRow + nDataHeight -1, 2, 2, ::nColorBox, ::nBoxPen )      
        
    //::Box( nRow, If( ::lRecordSelector, ::nRecSelWidth, 1 ), ;
    //  nRow + nDataHeight, nLast, ::nColorBox )
endif




best 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: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Possible to change gradient-directions in xBrowse ?
Posted: Thu Oct 31, 2019 01:16 PM
s there maybe a solution to protect a cell from to be covered from the focused rowcolor
to keep the cellcolor / gradient visible like used for images ?


oCol:bClrSelFocus := oCol:bClrStd
Regards



G. N. Rao.

Hyderabad, India
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Possible to change gradient-directions in xBrowse ?
Posted: Fri Nov 01, 2019 03:45 PM
Thank You very much

that works fine and I could finish the tool

If You downloaded the tool and it slows down with empty gradients ( shown as black )
please download again
There is a problem with the gradient-position 0
I changed this value to 0.1 and it is working fine now

http://www.pflegeplus.com/DOWNLOADS/GrdPaint2.zip

complete new design
100 positions are defined
You can clear the fields and reset the counter



with a small change in xBrowse the pensize can be defined :-)



oCol:bClrSelFocus := oCol:bClrStd

protecting the gradient-field



Best 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.

Continue the discussion