Skip to main content
All docs
V26.1
  • CommandState Class

    Contains a command’s state.

    Declaration

    export class CommandState

    Properties

    enabled Property

    Returns whether the command is enabled in the RichEdit control.

    Declaration

    readonly enabled: boolean

    Property Value

    Type Description
    boolean

    true if the command is enabled; otherwise, false.

    Remarks

    var fontColorEnabled = richEdit.getCommandState(DevExpress.RichEdit.HomeTabCommandId.ChangeFontForeColor).enabled;
    

    value Property

    Returns the command’s value.

    Declaration

    readonly value?: any

    Property Value

    Type Description
    any

    The command’s value. undefined if the command does not have a value or has multiple values in the selection.

    Remarks

    var currentFontColor = richEdit.getCommandState(DevExpress.RichEdit.HomeTabCommandId.ChangeFontForeColor).value;
    

    visible Property

    Returns whether the command is visible.

    Declaration

    readonly visible: boolean

    Property Value

    Type Description
    boolean

    true if the command is visible; otherwise, false.

    Remarks

    var copyCommandVisible = richEdit.getCommandState(DevExpress.RichEdit.ContextMenuCommandId.Copy).visible;