xBrowse-solution for painting a row-color-GROUP ?

xBrowse-solution for painting a row-color-GROUP ?

Postby ukoenig » Tue Aug 16, 2016 8:46 am

Hello,

is there a good solution to show rowcolors as a group ?

A normal defined pyjama-style looks like :
Code: Select all  Expand view

oBrw:bClrStd = { || If( oBrw:KeyNo() % 2 == 0, ;
                         { If( ( oBrw:cAlias )->( Deleted() ), CLR_HRED, CLR_BLACK ),;
                           RGB( 198, 255, 198 ) }, ;
                         { If( ( oBrw:cAlias )->( Deleted() ), CLR_HRED, CLR_BLACK ),;
                           RGB( 232, 255, 232 ) } ) }
oBrw:bClrSel = { || { If( ( oBrw:cAlias )->( Deleted() ), CLR_HRED, CLR_WHITE ),;
                           RGB( 0x33, 0x66, 0xCC ) } }
 


For a tourplanning I need a different solution
A defined tour must be completed with 2 drivers
that means I must show ( complete ) 2 equal row-colors ( pyjama ) as a group
This sample shows position 3 and 5 are not completed.

Image

Maybe changing something inside this section ?


cTour := "F01"

oBrw:bClrStd := { || cTour := ("PFLEGER")->TOUR, ; // start-tour-color
If( ("PFLEGER")->TOUR == cTour, ;
{ If( ( oBrw:cAlias )->( Deleted() ), 255, aVal[103] ), aVal[102] }, ;
{ If( ( oBrw:cAlias )->( Deleted() ), 255, aVal[101] ), aVal[100] } ) }
oBrw:bClrSel := ;

...
cTour := ("PFLEGER")->TOUR // check tour in next row keep color until value changes

any idea ?

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

Re: xBrowse-solution for painting a row-color-GROUP ?

Postby ukoenig » Fri Aug 26, 2016 8:23 am

The solution I found :

using the pyjama-effect but for multiple rows
added a indexed numeric field N 2.0 ( only needed for sorting )
Adding values like 1, 2, 9, 16 forces a group of row-colors

:bClrStd := { || If( ("PFLEGER")->SORT %2 == 0, ; // the indexed field is used
{ If( ( oBrw[5]:cAlias )->( Deleted() ), 255, aVal[103] ), aVal[102] }, ;
{ If( ( oBrw[5]:cAlias )->( Deleted() ), 255, aVal[101] ), aVal[100] } ) }
:bClrSel := ;
:bClrSelFocus := { || { If( ( oBrw[5]:cAlias )->( Deleted() ), 255, aVal[105] ), aVal[104] } }

still solved another problem :
unequal values ( edit field ) from the combo-selection must be shown with a different color :

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 105 guests