Skip to main content
All docs
V25.1
  • TdxAICommandList.Available Property

    Specifies if an individual AI-powered command is available to users.

    Declaration

    property Available[const AID: string]: Boolean read; write;

    Property Value

    Type Description
    Boolean

    Specifies if the AID command is available to users:

    True
    The command is available. This option enables all UI elements (and other options, such as a dedicated keystroke) associated with the command.
    False
    The command is unavailable and all associated UI elements are disabled. This option is useful if the target command is not applicable to the current state of your application (for example, when no text is selected for the Translate command).

    Note

    Add and Insert procedures initialize the property value for added commands.

    Remarks

    Use the Available property to enable or disable individual AI-powered commands available for the parent control. You can call Find and IndexOf methods to identify if a command is present in the collection.

    Code Example: Disable Individual AI-Powered Commands

    The following code example disables Expand, Shorten and Summarize commands in the context menu:

    uses
      dxRichEdit.Control,  // Declares TdxRichEditControl
      dxAI,  // Declares AI-specific types
      dxAI.Commands.Consts;  // Declares AI command identifiers
    // ...
    
    procedure TMyForm.dxRichEditControl1GetAICommands(Sender: TObject;
      const AAICommands: TdxAICommandList);
    begin
      AAICommands.Available[TdxAICommandIDs.Expand] := False;
      AAICommands.Available[TdxAICommandIDs.Shorten] := False;
      AAICommands.Available[TdxAICommandIDs.Summarize] := False;
    end;
    

    VCL Rich Edit: Individual Disabled AI-Powered Commands

    Default Value

    The Available property’s default value is True.

    See Also