by TimStone » Sat Nov 08, 2008 1:24 am
// Create the BROWSE
REDEFINE BROWSE oLbxin ID 716 OF oDiw ON CHANGE oDiw:update( ) UPDATE
oLbxin:setoDBF( oInv )
add column to oLbxin header "Part" data oInv:invnum ALIGN 0,1 size 150
add column to oLbxin Header "Description" data oInv:invdes ALIGN 0,1 size 300
add column to oLbxin header "Cross Ref." data oInv:invcod ALIGN 0,1 size 150
add column to oLbxin header "On Hand" data oInv:invstk ALIGN 2,1 size 90
add column to oLbxin Header "Charge" data oInv:invchg ALIGN 2,1 size 90
add column to oLbxin Header "Location" data oInv:invloc ALIGN 0,1 size 90
oLbxin:nLineStyle:=0
oLbxin:nHeightCell += 4
oLbxin:nHeightHead += 6
oLbxin:lNoHScroll := .T.
oLbxin:setColor( {1}, {CLR_BROWSETEXT} ) // cell text color
oLbxin:setColor( {4}, {{ CLR_HEADERTOP, CLR_HEADERBOT }} ) // degraded headers background color
oLbxin:setColor( {14}, {{ CLR_HEADERTOP, CLR_HEADERBOT }} ) // degraded headers background color
// Show alternating color in rows
lClrFlag:=.f.
oLbxin:bSkip := {|nRecs| nRecs := oInv:skipper( nRecs) }
oLbxin:setColor( {2}, {{|| IIF(ADSKeyNo() % 2 == 0, CLR_PANE1, CLR_PANE2 ) }} )