TcxButtonImageOptions.Glyph Property
Specifies one or more glyphs that the button can display.
Declaration
property Glyph: TdxSmartGlyph read; write;
Property Value
Type | Description |
---|---|
TdxSmartGlyph | The Smart Image container with one or more glyphs in one source image. If the source image contains multiple glyphs, different glyphs correspond to different button states. The NumGlyphs property specifies the number of glyphs in the source image. |
Remarks
You can use the Glyph
property to load an image that contains one or more identically-sized glyphs in a row from left to right. The NumGlyphs property specifies the number of glyphs stored in the source image.
Glyph Order and Button States
If the source image loaded into the image container accessible through the Glyph
property consists of multiple images, the image order defines their corresponding button states as follows:
- Normal
The first glyph in the source image always corresponds to the normal (base) button state (when the button is not pressed, activated, or disabled).
If the source image contains only one glyph (the NumGlyphs property value is
1
(default)), the button always uses this glyph for all its states.- Disabled
- The second glyph in the source image corresponds to the disabled (non-interactive) button state.
- Clicked
- The third glyph in the source image corresponds to the clicked state.
- Down/Pressed
- The fourth glyph in the source image corresponds to the down (or pressed/held down) button state.
Glyph Button Position
You can use Layout, Margin, and Spacing properties to position the loaded glyph within the button.
Glyph Background Transparency
The Glyph
property uses a TdxSmartGlyph object as an image container. All transparent pixels in the loaded image should use the alpha channel.
Glyph Property and Other Glyph Sources
The Glyph
property has higher priority than the ImageIndex
(TcxButtonImageOptions.ImageIndex) property and the ImageIndex
(TContainedAction.ImageIndex) of the associated Action object.