.. _pages/widget/togglebutton#togglebutton:

ToggleButton
************
The ToggleButton widget is a classic GUI ToggleButton with to states: pressed or not pressed.

.. _pages/widget/togglebutton#preview_image:

Preview Image
-------------

|ToggleButton|

.. |ToggleButton| image:: /pages/widget/togglebuttom.png

.. _pages/widget/togglebutton#features:

Features
--------
* Contain text and/or icon.
* Mouse and keyboard support.
* Ellipsis: If the label does not fit into the widget bounds an ellipsis (”...”) is rendered at the end of the label.

.. _pages/widget/togglebutton#description:

Description
-----------
The button is a classic GUI element, that supports two states: pressed and not pressed. The state is changed by a mouse (click) or keyboard (enter or space) event. There is an additional third state when the tri-state mode is enabled. The third state means that the widget was neither pressed nor unpressed, i.e. the state of the button is undetermined.

.. _pages/widget/togglebutton#demos:

Demos
-----
Here are some links that demonstrate the usage of the widget:

* `Button demo with all supported buttons <http://demo.qooxdoo.org/%{version}/demobrowser/#widget~Button.html>`_
* `Form showcase demo <http://demo.qooxdoo.org/%{version}/demobrowser/#showcase~Form.html>`_

.. _pages/widget/togglebutton#api:

API
---
| Here is a link to the API of the Widget:
| `qx.ui.form.ToggleButton <http://demo.qooxdoo.org/%{version}/apiviewer/#qx.ui.form.ToggleButton>`_

