function Main()
local oDlg, oBrw, oFont, aData, n
aData := { ;
{'Lunedi', "S","S","S","S","S","N","S","S","S","S" },;
{'Martedi', "S","S","S","S","S","S","S","S","S","S" },;
{'Mercoledi', "S","S","S","S","S","S","S","S","S","S" },;
{'Giovedi', "S","S","S","S","S","N","S","S","S","S"},;
{'Venerdi', "S","S","S","S","S","S","S","S","S","S"},;
{'Sabato', "S","S","S","S","S","S","S","S","X","S" } ;
}
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 500,400 PIXEL FONT oFont
@ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
DATASOURCE aData AUTOCOLS ;
HEADERS "", "1","2","3","4","5","6","7","8","9","10" ;
SIZES 55, 35, 35, 35,35,35,35,35,35,35,35 ;
CELL LINES NOBORDER ;
ON DBLCLICK If( oBrw:nColSel > 1, ;
( oBrw:aRow[ oBrw:nColSel ] := ;
If( oBrw:aRow[ oBrw:nColSel ] == 'S', 'N', 'S' ), ;
oBrw:RefreshCurrent() ), nil )
for n := 2 to 11
WITH OBJECT oBrw:aCols[ n ]
:bBmpData := { |v| If( v == 'S', 1, If( v == 'N', 2, 3 ) ) }
:bStrData := { || nil }
END
next
WITH OBJECT oBrw
:AddBitmap( { "bitmaps\ok_32.bmp", "bitmaps\no_32.bmp", "bitmaps\question.bmp" } )
:nRowHeight := 35
//
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED ON INIT ( oBrw:SetFocus(), .f. )
RELEASE FONT oFont
return nil
//----------------------------------------------------------------------------//