# showIf Attribute

Specifies the editing context of the button.

## Type

    xsd:NMTOKEN

## Remarks

The showIf attribute is an optional attribute of the button element.

Allowed values include "always", "enabled", and "immediate". Default value is "always". Only applies to buttons used with editing components. If the showIf attribute is set to "enabled", then the button is visible only if the action is contextually enabled. If the showIf attribute is set to "immediate", then the button is visible only if the action is contextually immediate.

## Example

The following is an example of the showIf attribute as it is used in the button element:

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

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp