Skip to main content

TcxButtonImageOptions.Glyph Property

Specifies the image(s) to be displayed by a button.

Declaration

property Glyph: TdxSmartGlyph read; write;

Property Value

Type
TdxSmartGlyph

Remarks

With the default NumGlyphs property value, the image specified via the Glyph property is displayed in any button state. To provide images for specific button states, combine up to four equal size images arranged in a row into one image, assign it to the Glyph property, and specify the number of combined images via the NumGlyphs property.

Image Position Button State Description
First Up Appears when the button is up (unselected). This image is also used when the button has focus (for example, if a user tabs to it); in this case, a focus rectangle is drawn around the button. If no other images exist in the bitmap, buttons also use this image for all other states.
Second Disabled Usually appears dimmed to indicate that the button can’t be selected.
Third Clicked Appears when the button is clicked. The Up image reappears when a user releases the mouse button.
Fourth Down Appears when the button remains down (indicating that it is left selected).

The following screenshot illustrates a sample image that includes four button state images.

The color of the lower left pixel of the Glyph image specifies the “transparent” color. Any pixel of the matching color will be transparent.

You can specify the image position relative to the caption and button edges and adjust it as required using the Layout, Margin, and Spacing properties.

Note

The Glyph property overrides the ImageIndex property and the ImageIndex property of the action linked to the button.

See Also