Skip to main content

TdxColorGallery Class

An unbound color gallery component.

Declaration

TdxColorGallery = class(
    TdxCustomColorGallery
)

Remarks

A color gallery allows users to switch between available colors. You can use ColorPalette and ColorSet properties to switch between predefined palettes. To populate the gallery with custom colors, handle the OnGetCustomColorSet event.

VCL Editors: Color Gallery Examples

UI Automation/Accessibility Support

The color gallery component is mapped to a node in the UI Automation tree when the global UI Automation flag (dxUIAutomationEnabled) is enabled. When a user moves focus between color items, the gallery component exposes the corresponding hexadecimal color code to the active third-party assistive tool (such as Microsoft Narrator).

UI Automation Settings

Use Automation.Name and Automation.Description properties to specify the color gallery name and add optional information that are then used to clarify UI element purpose for users who rely on third-party assistive tools.

Refer to the TdxAutomationElementSettings class description for detailed information on all available options.

Main API Members

The list below outlines key members of the TdxColorGallery class.

Appearance Settings

BorderStyle
Specifies if the gallery control displays a border.
ItemSize
Specifies color item size.
ShowItemBorders
Specifies if color gallery items display borders.

User Interaction Options

Automation
Provides access to UI Automation and accessibility-related settings.
OnChange
Allows you to execute custom code in response to selected color changes.
OnItemClick
Allows you to execute custom code in response to clicks on color items.
ColorPalette
Allows you to switch between Standard, Extended, and Office palette types.
ColorSet

Allows you to switch between available themes for the Office palette.

You can set the ColorSet property to csCustom to populate the gallery with custom colors using the OnGetCustomColorSet event.

ColorValue | EditValue
Specify the selected color.
OnGetCustomColorSet
Allows you to populate the gallery with custom colors when the ColorSet property is set to csCustom.

General-Purpose API Members

BeginUpdate | EndUpdate
Allow you to avoid excessive redraw operations during batch content and setting changes.
Visible
Specifies if the gallery control is visible.
TdxGalleryControl
A gallery control.
TdxDBColorGallery
A data-aware color gallery control.
TdxRibbonBackstageViewGalleryControl
A Ribbon Backstage View gallery.
See Also