Code: Select all
method browser()
local oDlg,oBrw,oMeter,oFont,oCol,nFor,oChild
::setOrder(2)
::gotop()
define font oFont name "Ms Sans Serif" size 0,-14 BOLD
DEFINE DIALOG oDlg FROM 0,0 TO 45,128 TITLE "meter reads browse "
oBrw := TXBrowse():New( oDlg )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:nHeaderLines := 1
oBrw:nFooterLines := 1
oBrw:nDataLines := 1
oBrw:lFooter := .t.
oBrw:CreateFromCode()
oBrw:nTop = 0
oBrw:nLeft = 0
oBrw:nWidth = 1000
oBrw:nHeight =600
oBrw:SetRDD()
for nFor := 1 to ::Fcount()
oBrw:aCols[ nFor ]:oDataFont := oFont
next
// Setup for using database class
oBrw:cAlias:= ::cAlias
oBrw:bSkip:= {|nRecs| ::skipper( nRecs ) }
oBrw:bGotop:= {|| ::gotop() }
oBrw:bGoBottom:= {|| ::goBottom() }
oBrw:bBookMark := {| n | iif( n == nil, ::RecNo() , ::Goto( n ) ) }
oMeter:= self
ACTIVATE DIALOG oDlg ON INIT (oBrw:SetSize( 1000, 600 ), BuildButtons( oMeter,oBrw,oDlg),oBrw:Refresh(.t.), oDlg:Refresh(.t.))
RETURN nil