Page 1 of 1
Possible to change gradient-directions in xBrowse ?
Posted: Wed Oct 30, 2019 8:41 pm
by ukoenig
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
Re: Possible to change gradient-directions in xBrowse ?
Posted: Wed Oct 30, 2019 10:47 pm
by nageswaragunupudi
Yes
Please try this way:
Code: Select all
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,
Re: Possible to change gradient-directions in xBrowse ?
Posted: Thu Oct 31, 2019 10:42 am
by ukoenig
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: Select all
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
Re: Possible to change gradient-directions in xBrowse ?
Posted: Thu Oct 31, 2019 1:16 pm
by nageswaragunupudi
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
Re: Possible to change gradient-directions in xBrowse ?
Posted: Fri Nov 01, 2019 3:45 pm
by ukoenig
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