Garry Posted September 12, 2012 Share Posted September 12, 2012 procedure TMainForm.UniButton3Click(Sender: TObject); var E : TUniCalendarEvent; i : integer; begin UniCalendar1.Date:=Date; UniCalendarPanel1.StartDate:=Date; while (UniCalendarPanel1.Events.Count >0) do UniCalendarPanel1.Events.Item[0].Destroy; for I := 1 to 10 do begin E:=UniCalendarPanel1.Events.Add; E.CalendarId:=i; E.Title:='Meeting' +IntTostr(i); E.StartDate:=EncodeDateTime(yearof(Now),monthof(now),DayOf(now),8+i,0,0,0); E.EndDate:= EncodeDateTime(yearof(Now),monthof(now),DayOf(now),8+i,30,0,0); end; end; Quote Link to comment Share on other sites More sharing options...
Garry Posted September 12, 2012 Author Share Posted September 12, 2012 my apology, sent it in hurry and did not notice that it has already posted. Please discard this,I added a new post. procedure TMainForm.UniButton3Click(Sender: TObject); var E : TUniCalendarEvent; i : integer; begin UniCalendar1.Date:=Date; UniCalendarPanel1.StartDate:=Date; while (UniCalendarPanel1.Events.Count >0) do UniCalendarPanel1.Events.Item[0].Destroy; for I := 1 to 10 do begin E:=UniCalendarPanel1.Events.Add; E.CalendarId:=i; E.Title:='Meeting' +IntTostr(i); E.StartDate:=EncodeDateTime(yearof(Now),monthof(now),DayOf(now),8+i,0,0,0); E.EndDate:= EncodeDateTime(yearof(Now),monthof(now),DayOf(now),8+i,30,0,0); end; end; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.