Specifies the image displayed by the component or used to draw the component’s text.
Declaration
Read-Write Property | A TBitmap object |
componentObj | One of the user forms components and objects listed in the Applies To section |
Applies To
This property applies to the following components and objects:
TcxButton, TcxCheckBoxProperties, TcxEditButton, TcxLabelProperties
Description
The meaning of the Glyph
property depends on the object it applies to.
TcxButton.Glyph
For a TcxButton
component, Glyph
specifies the image displayed within the button along with the button text. To position the image within the button, use the Layout
property. The distance between the image and the button text is specified by the Spacing
property and the distance between the image and the button’s edge - by the Margin
property.
The Glyph
image can be divided into several parts, each corresponding to the specific button state (see table below). All images must be the same size and placed next to each other in a single row. The number of images is specified by the NumGlyphs
property.
The following table describes correspondence of Glyph
parts to button states.
Image Position | Description |
---|---|
First | Displayed when the button is up (unselected) or focused. If this is the only image in Glyph , this image is also displayed in other button states, except for the disabled state. |
Second | Displayed when the button is disabled. |
Third | Displayed when the button is pressed. |
Fourth | Displayed when the button remains down. |
Note: | The lower left pixel of the whole image is treated as a transparent color. Any image pixel with the same color as the lower left pixel will appear transparent. |
TcxCheckBoxProperties.Glyph
For a TcxCheckBoxProperties
object, Glyph
specifies the image displayed in the check box component instead of a check box. To align the image within the component, use the Alignment
property.
The Glyph
image can be divided into several parts, each corresponding to the specific check box state (see table below). All images must be the same size and placed next to each other in a single row. The number of images is specified by the GlyphCount
property. The correspondence of Glyph
parts and check box states is described in the GlyphCount Property
topic.
Note: | The lower left pixel of the whole image is treated as a transparent color. Any image pixel with the same color as the lower left pixel will appear transparent. |
If Glyph
does not hold an image (that is, the Glyph
property cell on the Properties page of the User Forms editor displays the “None” value), or GlyphCount
is equal to 0, the component displays the standard check box.
TcxEditButton.Glyph
The Glyph
property specifies the image to be drawn on the edit button’s surface for the TcxEditButton
object.
Property Value
A TBitmap
object that contains the desired image.
Note: | To draw the image specified by the Glyph property, the edit button’s Kind property must be set to bkGlyph . |
TcxLabelProperties.Glyph
For a TcxLabelProperties
object, Glyph
specifies the texture used to draw the label caption text.
Property Value
A TBitmap
object that contains the desired image.
To specify an image at design-time, open the Properties page of the User Forms editor and press the ellipsis button within the Glyph
property value cell. Use the ensuing Image Editor to view the image, load new images or save the current image to a file.