Sign in Join
FPDoc Onlineexperiment

TCustomColorBox.ColorRectWidth property

Member of TCustomColorBoxpublicIn unit ColorBox

Width for the color sample (swatch) displayed for colors in the item list.

Declaration

pascal
property ColorRectWidth: Integer read GetColorRectWidth write SetColorRectWidth;

Description

ColorRectWidth is an Integer property which contains the number of pixels used to draw the color sample (or swatch) for each of the Colors in the combo-box control. The height is determined using the item height for the combo-box control.

If an explicit value has not been assigned to the property, the value in cDefaultColorRectWidth is scaled to the current display density and used in the property value.

Setting a new value for the property causes the control to be redrawn.

Use ColorRectOffset for the number of pixels used between the color sample and its name.

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