I try TXbrowse (Super Header) but it shows strange. What do I did wrong?
This is code of this image.
- Code: Select all Expand view
- #include 'fivewin.ch'
#include 'xbrowse.ch'
*--------------------*
Function main
local oWnd, oBrw
local aRoom := {}
local aCol := {1}
local aWid := {30}
local aHead:= { 0 }
local aTop, oCol
local n, o, x, nHead
local acHead := {'Room'}
SET DATE FORMAT TO 'DD/MM/YY'
SET DATE BRITISH
SET(_SET_DELETED,.T.)
SetHandleCount(200)
for n := 1 to 30
aadd( aRoom , { str( n, 2) } )
for o := 1 to 70
aadd( aRoom[n], '' )
if n = 1
aadd( aCol, o+1 )
aadd( aWid, 20 )
if o = 1
nHead := 2
elseif day(date()+(o-1)) = 1
nHead := 4
else
nHead := 1
end
aadd( aHead, nHead )
aadd( acHead, substr( dtos(date()+(o-1)),7,2 ) )
end
next
next
aTop := { cmonth(date()),cmonth(lastday(date())+1),cmonth(lastday(lastday(date())+1)+1) }
DEFINE WINDOW oWnd TITLE "Room Plan"
@ 0,0 XBROWSE oBrw ARRAY aRoom ;
COLUMNS aCol ;
OF oWnd
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nColDividerStyle := LINESTYLE_LIGHTGRAY // LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_LIGHTGRAY // LINESTYLE_NOLINES
oBrw:nHeader := 1
oBrw:aHeaderTop := aTop
oBrw:nHeaderHeight := 40
oBrw:nColSel := 2
oBrw:lAllowColSwapping := .f.
oBrw:lColDividerComplete := .F.
oBrw:lHScroll := .T.
oBrw:lVScroll := .F.
oBrw:lFastEdit := .F.
oBrw:nFreeze := 1
for x := 1 to len(aHead)
oBrw:aCols[x]:cHeader := acHead[x]
oBrw:aCols[x]:nHeaderType := aHead[x]
oBrw:aCols[x]:nWidth := aWid[x]
oBrw:aCols[x]:lAllowSizing:= .F.
next
* oBrw:lColDividerComplete := .t.
oBrw:CreateFromCode()
oWnd:oClient := oBrw
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
function lastday( dDate )
local nextmon := dtos(dDate+if(day(dDate)>15,16,31))
local nextday1 := ctod('01/'+subs(nextmon,5,2)+'/'+subs(nextmon,1,4))
return nextday-1