Page 1 of 1

Can I get an example of tsbrowse+ADS+TDatabase objects

PostPosted: Thu Nov 06, 2008 1:39 pm
by RAMESHBABU
Hi all

As per subject.

Regards.,

Ramesh Babu P

Example

PostPosted: Sat Nov 08, 2008 1:24 am
by TimStone
// 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 ) }} )

PostPosted: Sat Nov 08, 2008 5:27 am
by RAMESHBABU
Mr.Tim,

Thank you very much. This is what exactly what I am looking for.

Regards,

- Ramesh Babu P