Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to Add a Custom Label to the Event's Editor and Popup Menu

The EventLabels global variable provides access to the collection of color labels for user events. This collection is represented by a TcxSchedulerEventLabels class. To add a new label to the collection, use the Add method. It takes two arguments – color and caption. An icon with the specified color and the specified caption text identify the created color label item within the Event dialog’s Label dropdown, and in the user event‘s context menu.

The following sample code demonstrates how to add a custom color label to the collection:

// ...
uses
  cxSchedulerUtils;
// ...
initialization
  EventLabels.Add(clRed, 'Blood Tests');
end.

The following image demonstrates the Blood Tests item in the Event dialog and in the user event‘s context menu:

See Also