Share via


button Element

Defines a button that has an associated action.

Type

  xsd:complexType

Structure

Name Description
action (Optional attribute) Specifies an action of an editing component, using the syntax "NameOfEditingComponent::NameOfAction".
caption (Optional attribute) Provides the caption displayed on the button.
icon (Optional attribute) Provides a Uniform Resource Locator (URL) to a bitmap (.bmp) or graphics interchange format (.gif) file, which is used for the button or menu item.
name (Optional attribute) Used to associate the OnClick event handler of the button with a scripting function.
showIf (Optional attribute) Specifies the editing context of the button.
tooltip (Optional attribute) Provides the ScreenTip text to be used for the button.
xmlToEdit (Optional attribute) Specifies the name of an xmlToEdit element, for which the button is used.

Remarks

The button element is an optional element of the toolbar, menu, and menuArea elements. Each button element declaration corresponds to a button on a toolbar, menu, or menu area item, and each button has an action (or command) associated with it.

Example

The following is an example of the button element:

  <xsf:menuArea name="msoInsertMenu">
   <xsf:menu caption="&amp;Section">
      <xsf:button action="xCollection::insert" xmlToEdit="CD_10"
         caption="CD" showIf="always"></xsf:button>
      <xsf:button action="xCollection::insert" xmlToEdit="Track_14" 
         caption="Track" showIf="always"></xsf:button>
      <xsf:button action="xOptional::insert" xmlToEdit="Label_16" 
         caption="Label"></xsf:button>
   </xsf:menu>
</xsf:menuArea>