Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RibbonItemBase Class

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);
    }
});
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

#Property Value

Type Description
RibbonItemId

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
RibbonItemType

The item type.