10.1. Text style toggles
Prev | 10. A specific tool bar | Next

### 10.1. Text style toggles

A tool bar normally contain plain buttons. For example, the following plain button invokes native command `convert` in XMLmind XML Editor - Commands to convert the implicit or explicit selection to the `bold` element:

    <button toolTip="Convert to bold"
            icon="xxe-config:common/icons/boldText.png">
      <command name="convert"
        parameter="[implicitElement] {http://www.xmlmind.com/ns/sect}bold" />
    </button>

However, we have chosen to add to the "Simple Section" tool bar text style toggles rather than plain buttons:

    <button toolTip="Toggle bold"
            icon="xxe-config:common/icons/bold.png">
      <class>com.xmlmind.xmleditapp.kit.part.toolbar.TextStyleToggle</class>

      <command name="pass"
        parameter="{http://www.xmlmind.com/ns/sect}bold" />
    </button>

Text style toggles emulate the behavior of the Bold, Italic, Underline, etc, toggles found in the tool bars of almost all word-processors. Such toggles are declared slightly differently than plain buttons. See Section 29.1.2, “The `TextStyleToggle` custom control”.

Prev | Up | Next
10. A specific tool bar | Home | 11. Element templates