Vcl.ExtCtrls.TColorBox.OnGetColors
Delphi
property OnGetColors: TGetColorsEvent read FOnGetColors write FOnGetColors;
C++
__property OnGetColors;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | published | Vcl.ExtCtrls.pas Vcl.ExtCtrls.hpp |
Vcl.ExtCtrls | TColorBox |
Description
Occurs when the control is populated with a customized list of colors.
Use OnGetColors to populate a customized list of colors to be placed in the TColorBox colors list.
The OnGetColors event is only called when Style includes the cbCustomColors property.
- Sender is the instance of the TColorBox.
- Items is a TStrings containing a list of colors displayed in the TColorBox.
- Items.Strings contains the list of display strings for the color box.
- Items.Objects contains the list of TColor values corresponding to each display name (Items.Strings), cast as a TObject.
- Note: When this event is raised, Items contains all of the colors that are specified in the Style property, such as cbStandard. Colors are added, moved, or removed from the TColorBox by manipulating this Items list.