
Best viewed with
|
|
|
1. Clearing an event list
2. Scrolling the month view component
3. Changing the selected day in the month view component
4. Determining selected dates in a month view component
1. Clearing an event list
Events may be deleted using the TcwEventIterator component
|
Delete all events
with TcwEventIterator.Create(cwManager1.Events) do begin
while First do
Event.Delete;
Free;
end;
|
2. Scrolling the month view component
Use the OriginDate property to scroll the month view
to a new month
|
Display July 2000
cwMonthView1.OriginDate := EncodeDate(2000, 7, 1);
|
3. Changing the selected day in the month view component
Use the Date property to change the selected day in
a monthview
|
Select 4th of July
cwMonthView1.Date := EncodeDate(2000, 7, 4);
|
4. Determining selected dates in a month view component
The month, day and week view components support multi
selection (set the MultiSelect property to true).
|
Find selected dates in a month view
var
MonthViewCell : TcwMonthViewCell;
begin
for r := 0 to cwMonthView1.RowCount - 1 do
for c := 0 to cwMonthView1.ColumnCount - 1 do begin
MonthViewCell := cwMonthView1.Cell[c, r] as TcwMonthViewCell;
if MonthViewCell.CellType = ctDay then
if MonthViewCell.Selected then
// Do something with MonthViewCell.Date here
end;
end;
|
Find selected cells in a day view
var
DayViewCell : TcwDayViewCell;
begin
for r := 0 to cwDayView1.RowCount - 1 do
for c := 0 to cwDayView1.ColumnCount - 1 do begin
DayViewCell := cwDayView1.Cell[c, r] as TcwDayViewCell;
if DayViewCell.CellType = ctSlot then
if DayViewCell.Selected then
// Do something with DayViewCell.DateTime and
// DayViewCell.Resource here
end;
end;
|
|
Copyright © 1998-2007 Innova Software ALL RIGHTS RESERVED
All trademarks are the property of their respective owners.
Webmaster webmaster@innovasoftware.com
|