Utilisation de Tplanner

Hello,

I’d like to use TPlaner to create a daily schedule.

I’ve managed to put the times in the left-hand column without any problems, and I’d like to display the dates and days of the week in the header.

I can’t seem to do this, and I haven’t found any examples in the documentation!

Or perhaps I haven’t searched properly.

Thanks in advance.

To begin with, what is the setting of Planner.Mode.PlannerType?

It's Plday

It is explained in the PDF developers guide page 13

Based on this, code to initialize a 2 week overview:

var
  i: integer;
begin
  planner1.Positions := 14;
  planner1.PositionGroup := 7;

  planner1.Header.Captions.Clear;
  planner1.Header.Captions.Add('');

  for i := 1 to 14 do
  begin
    planner1.Header.Captions.Add(DateToStr(Now+1));
  end;

  planner1.Header.GroupCaptions.Add('Week 17');
  planner1.Header.GroupCaptions.Add('Week 18');

end;

Thank you for your reply

That's fine