Skip to main content

TcxCustomScheduler.OnGetEventHintText Event

Fires before the hint window is shown when an end-user positions the mouse pointer over the user event‘s rectangle.

Declaration

property OnGetEventHintText: TcxSchedulerGetEventText read; write;

Remarks

By default, the hint window is displayed if the user event’s subject doesn’t fit its area in the user event’s rectangle, and the scheduler’s OptionsView.ShowHints property is set to True. The OnGetEventHintText event allows you to customize the hint text. To always display the hint window regardless of the user event’s content, provide at least an empty implementation of this event.

Sender specifies the scheduler.

AEvent specifies the user event the mouse pointer is currently positioned over.

AText specifies the text to be displayed in the hint window.

Note

the hint window will only be displayed if the scheduler’s OptionsView.ShowHints property is set to True.

Here is an example that implements the OnGetEventHintText event handler:

// ...
const
  CRLF = #13#10;
  HintFormat = 'Subject: %s' + CRLF + 'Location: %s' + CRLF + 'Message: %s' + CRLF;
begin
  with AEvent do
    AText := Format(HintFormat, [Caption, Location, Message]);
  with TcxSchedulerDateTimeHelper do
    AText := AText + 'Time: ' + TimeToStr(AEvent.Start) + '-' + TimeToStr(AEvent.Finish);
end;
See Also