Skip to main content

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.

VCL Editors Library: An Editor Button Displays a Custom Glyph

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:

VCL Editors Library: 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.

VCL Editors Library: Invoke the Button Collection Manager Dialog

Select a button in the collection manager dialog to display the button’s properties in the Object Inspector.

VCL Editors Library: Select a Button

Change the Kind property value to bkGlyph.

VCL Editors Library: Switch the Content Type to Glyph

Click an ellipsis button to the right of the Glyph property to invoke the Image Picker dialog.

VCL Editors Library: Invoke the Image Picker Dialog

Select the required image in the Image Picker dialog and click the OK button.

VCL Editors Library: Select the Required Image

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.

See Also