RibbonColorBoxItem Class
A ribbon color box item.
#Declaration
export class RibbonColorBoxItem extends 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
#constructor(id, text, value)
Initializes a new instance of the RibbonColorBoxItem
class with specified settings.
#Declaration
constructor(
id: RibbonItemId,
text: string,
value: string,
options?: RibbonColorBoxItemOptions
)
#Parameters
Name | Type | Description |
---|---|---|
id | Ribbon |
The item identifier. |
text | string | The item text. |
value | string | The current editor color. |
options | Ribbon |
The item options. |
#Properties
#localizationId Property
Specifies an identifier that allows you to localize the item’s text.
#Declaration
localizationId?: string
#Property Value
Type | Description |
---|---|
string | The item’s localization identifier. |
#Remarks
If the text property is specified, the item is not localized.
#text Property
Specifies the text displayed by the item input element.
#Declaration
text: string
#Property Value
Type | Description |
---|---|
string | The item text. |
#textOptions Property
Specifies options of the text displayed next to the item.
#Declaration
textOptions: RibbonItemTextOptions
#Property Value
Type | Description |
---|---|
Ribbon |
An object that contains text options. |
#type Property
Returns the item’s type.
#Declaration
readonly type = RibbonItemType.ColorBox
#Property Value
Type | Description |
---|---|
Color |
Identifies the Color |
#value Property
Specifies the currently selected color in text format.
#Declaration
value: string
#Property Value
Type | Description |
---|---|
string | The current editor color. |
#Remarks
The value property supports the following color formats.