Interface ExplicitButtonTemplate

A template that declares a button control in a DialogTemplate that explicitly declares the type property. Unless you have a good reason, use the ButtonTemplate type instead.

Hierarchy

Index

Properties

Optional beforeRemove

beforeRemove: function

If defined, this function will be called just before elements that represent the control have been added to the document tree.

Type declaration

Optional chain

chain: boolean

If true, this control will not appear on its own line but will instead be appended to the previously declared control. Multiple controls can be chained in sequence to combine them into one long row. When true, the control's label property has no effect.

Optional clip

clip: Clip

If specified, the button face will include a rendering of this clip. Both text and clip can be specified, but using one or the other is preferable. Buttons that include a clip that is not otherwise labelled should provide a spoken label.

Optional disabled

disabled: boolean

If true, the control will be disabled and the user will not be able to interact with it or change its value.

Optional element

element: HTMLButtonElement

This will point to the DOM element that best represents the control. This property is set by the interface framework and should be considered read only except for CustomWidgetTemplates.

Optional id

id: string

If defined, this control can be looked up from the template's controls array using this value. It must conform to the regular expression /^[A-Za-z][\w\-\:\.]*$/.

Optional initialFocus

initialFocus: boolean

If true, this control will be given focus when the dialog is shown. Default is false.

Optional label

label: string

If defined, this text will be used as a label for the control.

Optional Readonly labelElement

labelElement: HTMLLabelElement

If the control has a label that appears in the dialog, this will point to the DOM element responsible for the label. This property is set by the interface framework and should be considered read only.

Optional onAdd

onAdd: function

If defined, this function will be called once elements that represent the control have been added to the document tree.

Type declaration

Optional onUse

onUse: function

If defined, this function will be called whenever the user changes the control's value. If the function makes changes to the template state (changing label text, disabled state, and so on), those changes will be propagated to the actual dialog. If changes are made to the structure of the dialog (such as adding or removing a control), the function must indicate this by returning true. This will cause the dialog content to be rebuilt.

Type declaration

Optional Readonly rootElement

rootElement: HTMLElement

If a tree of DOM nodes is required to represent this control, this will point to the root element of that tree. This property is set by the interface framework and should be considered read only.

Optional spokenLabel

spokenLabel: string

If defined, screen readers will use this as the label for the control.

Optional text

text: string

The text that appears as a label within the button face. Not to be confused with the label property, which is shown beside the button.

type

type: "button"

This API is still under development and is subject to change. Copyright © Math I Can Do Solutions Incorporated and/or its licensors.