Delphi Learn ColorBoxStyles from DelphiVCL.ColorBox

FireWind

Свой
Регистрация
2 Дек 2005
Сообщения
1,957
Реакции
1,199
Credits
4,009
Learn ColorBoxStyles from DelphiVCL.ColorBox
By Muhammad Azizul Hakim May 27, 2021

TColorBoxStyle specifies how a color box control displays its selections.

The following table lists the possible values of TColorBoxStyle:

StyleMeaning when included
cbStandardColorsThe color box lists the first 16 color constants from the Graphics unit. These are the constants such as clRed or clBlack, that represent fixed RGB values.
cbExtendedColorsThe color box includes clMoneyGreen, clSkyBlue, clCream, and clMedGray.
cbSystemColorsThe color box includes the symbolic color constants that reflect the values specified in the Windows control panel.
cbIncludeNoneThe color box includes clNone. This option only has an effect if Style includes cbSystemColors.
cbIncludeDefaultThe color box includes clNone. This option only has an effect if Style includes cbSystemColors.
cbCustomColorThe first entry in the color box represents a custom color. When you select the Custom entry, the color box displays the Color selection dialog, where you can specify a custom color.
cbPrettyNamesThe color box lists the names as words rather than as the color constant strings (for example ‘Black’ rather than ‘clBlack’).
cbExtendedColorsThe color box lists a customized list of colors. Use the OnGetColors event to populate this list of colors (the displayed name and corresponding color).
Note:
  • The cbCustomColor value allows you to select only a custom color from the ColorDialog that is opened.
  • In the OnGetColors event, you can add as many colors as you want to the color box list.