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