Hi:
I would like to be able a single item on a Day within a day range. Then, have a running total of the numbers in the date range.
The problem is when the date is clicked on multiple times it adds items to the Array so that affects the total count even though one can only SEE one item.
*** Here is the CODE I am using
procedure TfrmInserts.PlannerMonthViewCampaignDaySelect(Sender: TObject;
SelDate: TDateTime);
var
i: Integer;
intTotalInsertions: Integer;
begin
With PlannerMonthViewCampaign.CreateItemAtSelection do
begin
Text.Text := IntToStr(iDropInsertions);
Planner.SetFocus;
intTotalInsertions := 0;
for i := 0 to PlannerMonthViewCampaign.Items.Count - 1 do
begin
intTotalInsertions := intTotalInsertions + StrToInt(Trim(PlannerMonthViewCampaign.Items[i].Text.Text));
end;
lblTotalInserts.Caption := IntToStr(intTotalInsertions);
end;
end;
HERE IS A SCREENSHOT ***