XLQP Gen1
ElementsControls

AddTextbox

Adds a single-line text input with an optional saved flag and callback.

AddTextbox

What it does

Adds a single-line text input with an optional saved flag and callback.

When to use it

Use it for names, IDs, search terms, commands, or short configuration values.

ElementFunction:AddTextbox(TextboxConfig)

LeftGroup:AddTextbox({
    Name = "Command",
    Default = "hello",
    Placeholder = "Type command",
    Moveable = true,
    Callback = function(value, enterPressed)
        if enterPressed then
            print(value)
        end
    end
})

Behavior and return value

AI agent mode

Set Ai = true to create the new agent. It accepts Height, PermissionMode, Effort, AgentPlanner, WorkspaceTools, ShowContextDetails, MultilineInput, PromptTransform, and OnResponse. Its controller adds Send, GetLastResponse, GetTools, CallTool, SetPermissionMode, SetEffort, SetMultiline, SetAgentPlanner, GetCurrentTask, and AskQuestion. See the AI agent guide for working examples and exact signatures.

The CreateTextbox, Textbox, AddInput, and CreateInput compatibility names forward to this constructor.

Call this method on the compatible section, tab, panel, or element container shown by the signature. Store the returned value when you need to update, read, or destroy the element later.

Fields marked optional may be omitted. XLQP then uses the method’s built-in default or leaves that feature disabled.