EditorButtonCollection.AddRange(EditorButton[]) Method
Adds an array of buttons to the current button collection.
Namespace: DevExpress.XtraEditors.Controls
Assembly: DevExpress.XtraEditors.v19.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
buttons | EditorButton[] | An array of EditorButton objects to add to the current button collection. |
Remarks
Use the AddRange method to add several buttons to the current button collection. The buttons parameter specifies an array of EditorButton objects to be added.
If you need to add a single button to the collection, use the EditorButtonCollection.Add method instead.
The following code adds two predefined buttons (OK and Delete) for a buttonEdit1 control. To remove old buttons, the Clear method is called.
EditorButton [] buttons = {new EditorButton(ButtonPredefines.OK),
new EditorButton(ButtonPredefines.Delete)};
buttonEdit1.Properties.Buttons.Clear();
buttonEdit1.Properties.Buttons.AddRange(buttons);
The result of the code is shown below:
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the AddRange(EditorButton[]) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.