FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse-solution for painting a row-color-GROUP ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
xBrowse-solution for painting a row-color-GROUP ?
Posted: Tue Aug 16, 2016 08:46 AM
Hello,

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

A normal defined pyjama-style looks like :
Code (fw): Select all Collapse
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.



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.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: xBrowse-solution for painting a row-color-GROUP ?
Posted: Fri Aug 26, 2016 08: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 :



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