TcxCustomEditButton.Glyph Property
Specifies the custom glyph for the editor button.
Declaration
property Glyph: TdxSmartGlyph read; write;
Property Value
Type | Description |
---|---|
TdxSmartGlyph | The Smart Image container for the custom editor button glyph. |
Remarks
An editor button can display a glyph, ellipsis, or text. To display a custom glyph, set the Kind property to bkGlyph and use the Glyph
property to load an image.
Load a Custom Glyph at Design Time
To load a custom glyph and use it in an editor button at design time, select an editor with support for embedded button management (TcxButtonEdit, for example) and expand the Properties node in the Object Inspector:
Click an ellipsis button to the right of the Buttons property to invoke the button collection manager dialog.
Select a button in the collection manager dialog to display the button’s properties in the Object Inspector.
Change the Kind property value to bkGlyph.
Click an ellipsis button to the right of the Glyph
property to invoke the Image Picker dialog.
Select the required image in the Image Picker dialog and click the OK button.
Load a Custom Glyph in Code
The following code example displays a custom glyph instead of an ellipsis in a button editor:
var
AEditButton: TcxEditButton;
begin
AEditButton := cxButtonEdit1.Buttons[0];
AEditButton.Kind := bkGlyph; // Changes the button content type to "Glyph"
AEditButton.Glyph.LoadFromFile('Search.svg'); // Loads a custom glyph
end;
Alternatively, you can use the ImageIndex property that has lower priority than Glyph
.