Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TPlanner
How to customize the text of the sidebar

With the event Planner.OnPlannerGetSidebarLines , you can fully customize the text of the sidebar. This event is triggered when the Planner needs the text for the 3 lines that can appear in the sidebar. With this event , you can customize the text, i.e. control the format of the hour displayed there. Or for example to remove the text at specific time slots.

Example 1: hide the display for minutes:

procedure TForm4.Planner1PlannerGetSideBarLines(Sender: TObject; Index,
  Position: Integer; var HourString, MinuteString, AmPmString: string);
begin
  MinuteString := '''';
end;

Example 2:

procedure TForm4.Planner1PlannerGetSideBarLines(Sender: TObject; Index,
  Position: Integer; var HourString, MinuteString, AmPmString: string);
begin
  if index mod 4 = 0 then
    HourString := inttostr(....)
  else
    HourString := '''';
end;