1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67:
| unit ggg;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids, StdCtrls;
type TForm1 = class(TForm) StringGrid1: TStringGrid; procedure StringGrid1Enter(Sender: TObject);
private
public end;
var Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.StringGrid1Enter(Sender: TObject);
var i, z: Integer; tmpDatum: TDate; Tag: String; begin tmpDatum := StrToDate('01.01.' + FormatDateTime('2010', now));
for i:=1 to 365 do
StringGrid1.Refresh; for i:=1 to 365 do begin
for z:=1 to 365 do begin if z = i then break; tmpDatum:= tmpDatum + 1; end; StringGrid1.Cells[i, 0]:= FormatDateTime('dd.mm.yyyy', tmpDatum); StringGrid1.Cells[i, 1]:= LongDayNames[DayOfWeek(tmpDatum)]; tmpDatum := StrToDate('01.01.' + FormatDateTime('yyyy', now)); StringGrid1.ColWidths[i] := 70;
end; StringGrid1.Cells[0,0] := 'Datum'; StringGrid1.Cells[0,1] := 'Wochentag'; StringGrid1.Cells[0,2] := 'LKW 1'; StringGrid1.Cells[0,3] := 'LKW 2'; StringGrid1.Cells[0,4] := 'LKW 3'; end;
end. |