Skip to main content

TcxEditButtonGlyphDrawParametersEvent Type

The procedural type for editor button glyph parameter customization events.

Declaration

TcxEditButtonGlyphDrawParametersEvent = procedure(Sender: TObject; AButtonIndex: Integer; AState: TcxEditButtonState; var AGlyph: TGraphic; var APalette: IdxColorPalette) of object;

Parameters

Name Type Description
Sender TObject

The editor that raised the button glyph parameter customization event.

Cast the Sender parameter to the corresponding TcxCustomEdit class descendant to access all public API members of the editor.

Tip

You can call the Sender.ClassName function to identify the actual editor class.

AButtonIndex Integer

Returns the index of the button whose glyph appearance the Sender editor is about to determine.

AState TcxEditButtonState

Returns the state of the currently processed editor button (AButtonIndex).

An editor button can be disabled, normal, pressed, or hot-tracked.

AGlyph TGraphic

Specifies the new glyph for the currently processed editor button (AButtonIndex). The button adjusts the assigned glyph’s size according to the dimensions of the initially displayed glyph defined in the Glyph property or in the image list at the parent editor level.

Note

You can replace a button glyph only if the button’s Kind property is set to bkGlyph.

APalette IdxColorPalette

Specifies the new palette for a new or existing vector glyph of the currently processed editor button (AButtonIndex).

Remarks

An editor button glyph parameter customization event occurs every time an editor is about to draw an editor button glyph.

You can handle this event to change button glyph appearance for different editor buttons in different states. Refer to the TcxCustomEditProperties.OnButtonGlyphDrawParameters event description for a code example.

TcxEditButtonGlyphDrawParametersEvent Type References

The TcxCustomEditProperties.OnButtonGlyphDrawParameters event references the TcxEditButtonGlyphDrawParametersEvent procedural type.

See Also