RibbonItemBase Class
In This Article
The base class for ribbon items.
#Declaration
TypeScript
export abstract class RibbonItemBase
#Remarks
var ribbonColorBox = new DevExpress.RichEdit.RibbonColorBoxItem;
ribbonColorBox.id = "myColorBox";
ribbonColorBox.beginGroup = true;
ribbonColorBox.text = "My Color";
ribbonColorBox.value = "red";
var options = DevExpress.RichEdit.createOptions();
options.ribbon.getTab(DevExpress.RichEdit.RibbonTabType.Home).insertItem(ribbonColorBox,3);
options.events.customCommandExecuted.addHandler(function(s, e) {
switch (e.commandName) {
case 'myColorBox':
console.log(e.parameter);
}
});
#Inheritance
See Also
#Properties
#beginGroup Property
Specifies whether an item separator should be displayed before the current item.
#Declaration
TypeScript
beginGroup: boolean
#Property Value
Type | Description |
---|---|
boolean | true to display a separator before the item; otherwise, false. |
#id Property
Returns the ribbon item identifier.
#Declaration
TypeScript
id: RibbonItemId
#Property Value
Type | Description |
---|---|
Ribbon |
The item identifier. |
#Remarks
When a user selects a custom ribbon item, the RichEdit raises the CustomCommandExecutedEvent. The event argument’s commandName property returns the currently processed item’s id property value.
Note
Rich Text Editor determines commands and ribbon items by numeric identifiers. Use strings or numbers greater than 10000 for custom command identifiers.
#type Property
Returns the ribbon item type.
#Declaration
TypeScript
abstract readonly type: RibbonItemType
#Property Value
Type | Description |
---|---|
Ribbon |
The item type. |