Changeset View
Changeset View
Standalone View
Standalone View
source/components/togglebutton.rst
Show All 11 Lines | |||||
12 | ------- | 12 | ------- | ||
13 | 13 | | |||
14 | *Toggle buttons* look similar to regular buttons, but are used to show | 14 | *Toggle buttons* look similar to regular buttons, but are used to show | ||
15 | or change a state rather than initiate an action. A toggle button's two | 15 | or change a state rather than initiate an action. A toggle button's two | ||
16 | states, set and unset, are shown by its appearing "pushed in" or "popped | 16 | states, set and unset, are shown by its appearing "pushed in" or "popped | ||
17 | out" respectively. | 17 | out" respectively. | ||
18 | 18 | | |||
19 | Toggle buttons are a valid option to indicate a state with the advance | 19 | Toggle buttons are a valid option to indicate a state with the advance | ||
20 | of using an icon. Compared to the related radio button or check box they | 20 | of using an icon. Compared to the related radio button or checkbox they | ||
21 | are an efficient way to save screen space. But toggle buttons should be | 21 | are an efficient way to save screen space. But toggle buttons should be | ||
22 | used with care outside a toolbar because the state is not clearly | 22 | used with care outside a toolbar because the state is not clearly | ||
23 | indicated. | 23 | indicated. | ||
24 | 24 | | |||
25 | Example | 25 | Example | ||
26 | ------- | 26 | ------- | ||
27 | 27 | | |||
28 | Guidelines | 28 | Guidelines | ||
29 | ---------- | 29 | ---------- | ||
30 | 30 | | |||
31 | Is this the right control | 31 | Is this the right control | ||
32 | ~~~~~~~~~~~~~~~~~~~~~~~~~ | 32 | ~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
33 | 33 | | |||
34 | - Use a toggle button to indicate a state if no other control apply, | 34 | - Use a toggle button to indicate a state if no other control apply, | ||
35 | i.e. in case of the :doc:`toolbar <toolbar>`. | 35 | i.e. in case of the :doc:`toolbar <toolbar>`. | ||
36 | - Prefer :doc:`radio buttons <radiobutton>` or :doc:`check boxes <checkbox>` | 36 | - Prefer :doc:`radio buttons <radiobutton>` or :doc:`checkboxes <checkbox>` | ||
37 | outside the toolbar. | 37 | outside the toolbar. | ||
38 | 38 | | |||
39 | Behavior | 39 | Behavior | ||
40 | ~~~~~~~~ | 40 | ~~~~~~~~ | ||
41 | 41 | | |||
42 | - Group toggle buttons in case of multiple selection. | 42 | - Group toggle buttons in case of multiple selection. | ||
43 | - Separate toggle buttons from other controls, so they are not mistaken | 43 | - Separate toggle buttons from other controls, so they are not mistaken | ||
44 | for push buttons. | 44 | for push buttons. | ||
Show All 9 Lines |