button (Domino DTD)

Represents a button. A button is a Notes hotspot displayed as a button. The button element does not define action buttons. See the action element section for more information on action button elements.

Containment Hierarchy

Contained by: %richtext.hot.inline;

Contains: <font>, <code>

Syntax

<!ELEMENT button ( #PCDATA | font | code )*>

Content

( #PCDATA | font | code )*

Contains any number of plain text, a <font> element, or a <code> element. The label for the button is character data in a string format.

Attributes

<!ATTLIST button

name

CDATA

#IMPLIED

width

%length;

#IMPLIED

widthtype

(%button.width.types;)

#IMPLIED

wraptext

%boolean;

#IMPLIED

bgcolor

%color;

#IMPLIED

type

(%button.types;)

"normal"

default

%boolean;

"false"

edge

(%button.edge.types;)

"system"

characters

%integer;

#IMPLIED

%html.core.attrs;

%reading.order.attrs;

>

bgcolor

Background color of the button.

characters

Number of characters that define the width of the button. Only applies when the widthtype attribute is set equal to the 'fixedcharacter' option of the %button.width.types; entity.

default

Boolean. If true, sets the current button as the default button for a dialog box.

edge

Style of the button edge as defined in the %button.edge.types; entity.

name

The programmatic name assigned to the button.

type

Specifies the type of button. The %button.types; entity defines the different special buttons that appear in the Notes UI.

width

Specifies a value in inches for the width.

widthtype

Specifies the type of width selected, as defined in the %button.width.types; entity.

wraptext

Indicates if the label text should wrap automatically if it is wider than the button's set width as defined in the width attribute.

Defined entities for <button> element

The %button.edge.types; entity lists the type of edges available for buttons.

Syntax:

<!ENTITY % button.edge.types "system | square | rounded ">

rounded

Rounds the corners of the rectangular button.

square

Rectangular button with squared off corners.

system

Applies the system's default button style to the button.

The %button.types; entity defines the different types of special hotspot buttons you can create using the Button Properties box.

Syntax:

<!ENTITY % button.types "normal | ok | cancel | help ">

cancel

A special hotspot button that cancels all actions in a template form and closes the current window when pressed.

help

A special hotspot button for use with Macintosh operating systems only.

normal

Standard Notes button, which displays with a grey background and no label, until you name the button.

ok

A special hotspot button that performs a save and close action when pressed in a template form.

The %button.width.types; entity lists the options for further defining the width of a button.

Syntax:

<!ENTITY % button.width.types "minimum | maximum | fixed | fitcontent | fixedcharacter ">

fitcontent

Specifies that the size of the button adjusts to fit its label.

fixed

Specifies that the button should not change from the width specified in the width attribute.

fixedcharacter

Specifies that the width of the button should equal the width of the number of characters specified in the character attribute of the button element.

maximum

Specifies that the value in the width attribute (Width field value on the Button property box in the Designer UI) is the maximum width for the button. The width can actually be less if the width of the label is less.

minimum

Specifies that the value in the width attribute (Width field value on the Button property box in the Designer UI) is the minimum width for the button. The width can actually be more if the width of the label is more.

Example