Represent an individual editor button displayed in a ButtonEdit control or descendant.
public class EditorButton : IDisposable, ICaptionSupport, ISupportCommandBinding
Public Class EditorButton Implements IDisposable, ICaptionSupport, ISupportCommandBinding
Related API Members
The following members accept/return EditorButton objects:
The ButtonEdit editor and all editors derived from it allow you to display an unlimited number of buttons within the editor box. The collection of buttons displayed by an editor is available via the RepositoryItemButtonEdit.Buttons property. This property provides access to a collection object whose members can be used to add, delete and access individual buttons. Each individual button is represented by an EditorButton object. Such objects provide a number of settings specifying the button's appearance, associated shortcut, visibility, tooltip, etc.
Note: editor buttons do not provide their own events allowing you to handle button clicks. To respond to clicking or pressing an editor button, you should handle the RepositoryItemButtonEdit.ButtonClick and RepositoryItemButtonEdit.ButtonPressed events respectively. These events provide an EditorButton object as the parameter which can be used to identify which button was affected.
The following code creates a button edit control and places it onto a panel1 panel. The code changes default button kind (ellipsis) into ButtonPredefines.OK and adds another button (ButtonPredefines.Delete) to the button's collection.
The result of code execution is displayed below:
ButtonEdit btnEdit1 = new ButtonEdit(); btnEdit1.Width = 100; btnEdit1.Properties.Buttons.Kind = ButtonPredefines.OK; btnEdit1.Properties.Buttons.Add(new EditorButton(ButtonPredefines.Delete)); panel1.Controls.Add(btnEdit1);