For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/lynxtron/api/@lynx-js/lynxtron/Interface.MessageBoxOptions.md.
  • 简体中文
  • @lynx-js/lynxtron / MessageBoxOptions

    MessageBoxOptions

    属性

    buttons?

    optional buttons: string[];

    Array of texts for buttons. On Windows, an empty array will result in one button labeled "OK".

    定义于

    apis/api/dialog.d.ts:28


    cancelId?

    optional cancelId: number;

    The index of the button to be used to cancel the dialog, via the Esc key. By default this is assigned to the first button with "cancel" or "no" as the label. If no such labeled buttons exist and this option is not set, 0 will be used as the return value.

    定义于

    apis/api/dialog.d.ts:70


    checkboxChecked?

    optional checkboxChecked: boolean;

    Initial checked state of the checkbox. false by default.

    定义于

    apis/api/dialog.d.ts:56


    checkboxLabel?

    optional checkboxLabel: string;

    If provided, the message box will include a checkbox with the given label.

    定义于

    apis/api/dialog.d.ts:52


    defaultId?

    optional defaultId: number;

    Index of the button in the buttons array which will be selected by default when the message box opens.

    定义于

    apis/api/dialog.d.ts:33


    detail?

    optional detail: string;

    Extra information of the message.

    定义于

    apis/api/dialog.d.ts:48


    icon?

    optional icon: string | NativeImage;

    定义于

    apis/api/dialog.d.ts:57


    message

    message: string;

    Content of the message box.

    定义于

    apis/api/dialog.d.ts:17


    optional noLink: boolean;

    On Windows, Lynxtron will try to figure out which of the buttons are common buttons (like "Cancel" or "Yes"), and show the others as command links in the dialog. This can make the dialog appear in the style of modern Windows apps. If you don't like this behavior, you can set noLink to true.

    定义于

    apis/api/dialog.d.ts:77


    normalizeAccessKeys?

    optional normalizeAccessKeys: boolean;

    Normalize the keyboard access keys across platforms. Default is false. Enabling this assumes & is used in the button labels for the placement of the keyboard shortcut access key and labels will be converted so they work correctly on each platform, & characters are removed on macOS, converted to _ on Linux, and left untouched on Windows. For example, a button label of Vie&w will be converted to Vie_w on Linux and View on macOS and can be selected via Alt-W on Windows and Linux.

    定义于

    apis/api/dialog.d.ts:87


    signal?

    optional signal: AbortSignal;

    Pass an instance of AbortSignal to optionally close the message box, the message box will behave as if it was cancelled by the user. On macOS, signal does not work with message boxes that do not have a parent window, since those message boxes run synchronously due to platform limitations.

    定义于

    apis/api/dialog.d.ts:40


    textWidth?
    macOS

    optional textWidth: number;

    Custom width of the text in the message box.

    定义于

    apis/api/dialog.d.ts:63


    title?

    optional title: string;

    Title of the message box, some platforms will not show it.

    定义于

    apis/api/dialog.d.ts:44


    type?

    optional type:
      | "error"
      | "none"
      | "info"
      | "warning"
      | "question";

    Can be none, info, error, question or warning. On Windows, question displays the same icon as info, unless you set an icon using the icon option. On macOS, both warning and error display the same warning icon.

    定义于

    apis/api/dialog.d.ts:23

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。