Sign in Join
FPDoc Onlineexperiment

ColorBox unit

Defines classes for selecting a color from a combo-box or a list box.

colorbox.pas contains TColorBox and TColorListBox. TColorBox is a component that displays colors in a combo-box control. TColorListBox is a component that displays colors in a list box control. colorbox.pas is part of the Lazarus Component Library ( LCL).

The following components are added to the Lazarus IDE component palette:

Additional Tab

  • TColorBox
  • TColorListBox

Classes and records

TColorBoxclassImplements combo-box control used to select a color name or value.
TColorListBoxclassImplements a list box control used to display and select color names and values.
TCustomColorBoxclassThe base class for TColorBox.
TCustomColorListBoxclassImplements the base class for TColorListBox.

Procedures and functions

RegisterprocedureRegister components for use in the Lazarus IDE.

Types

TColorBoxStylesetSet type used to store values from the TColorBoxStyles enumeration.
TColorBoxStylesenumerationRepresents the available colors and the name display style used in color controls.
TGetColorsEventprocedure typeSpecifies an event handler used to get the colors in a color control.
TLBGetColorsEventprocedure typeSpecifies an event handler signalled to get the available colors for a TColorListBox control.

Constants

cDefaultColorRectOffsetconstantDefault spacing between the color sample (swatch) and the color name in a combo-box or list box.
cDefaultColorRectWidthconstantDefault width for the color sample (swatch) in a color combo-box or list box.

Uses

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.