Skip to main content
All docs
V25.1
  • TcxCustomTextEditProperties.OnGetAICommands Event

    Allows you to modify the list of AI-powered commands available in the editor.

    Declaration

    property OnGetAICommands: TdxOnGetAICommands read; write;

    Remarks

    Handle the OnGetAICommands event to modify the list of AI-powered commands available in the editor and change the state of individual commands depending on specific conditions in your application. All required dependencies (dxAI and dxAI.Commands.Text units) are added automatically to the project if you implement an OnGetAICommands event handler.

    AI-Powered Command Implementation

    In v25.1, we ship no AI provider interaction APIs for DevExpress VCL controls[1]. Until Embarcadero ships official AI-related SDK libraries, VCL developers can plug in third-party libraries or leverage their own implementation to support different AI providers. We also published a GitHub example with a custom TdxAIChatClient implementation for a popular open-source AI library.

    Event Occurrence

    The OnGetAICommands event occurs every time the context menu is about to appear in the editor.

    Note

    The OnGetAICommands event can occur only if an AI service provider is registered and AI user commands are initialized.

    Event Parameters

    The following parameters are available within an OnGetAICommands event handler:

    Sender
    Provides access to the editor (a supported TcxCustomTextEdit descendant instance) that raised the OnGetAICommands event.
    AAICommands
    Provides access to a pre-populated collection of AI-powered commands available in the editor. Use this parameter to add, remove, rearrange, disable, or enable individual end-user AI commands.

    Refer to the TdxOnGetAICommands procedural type description for detailed information on all parameters accessible within an OnGetAICommands event handler.

    Footnotes
    1. Except for web-based ExpressReports that support the same AI-powered extensions available for DevExpress Web Reports. You can enable these extensions in the Project Settings dialog.

    See Also