Checkbox

from Wikipedia, the free encyclopedia

A checkbox (English for selection box , check box , marking field ) is a control element of graphical user interfaces . A checkbox is used to enter and display yes / no values ​​( Boolean variable ). It is customary to formulate the selection condition not as a question but as a statement (for example, “I accept the terms and conditions ” instead of “ do you accept the terms and conditions?”). Checkboxes are often used to set up interactive checklists , selection lists or question lists , where several options from a list can be selected. In contrast, with the very similar control element “ radio button ”, only one option can be selected at a time.

The instruction to activate a checkbox means marking it with a mouse click in order to activate the function behind it.

functionality

Three checkboxes, all in 'active' - i.e. clickable - status:
top: not marked,
middle: marked,
bottom: partially marked.

There are six possible states that a checkbox can assume:

  1. not marked (no / wrong / off / 0)
  2. marked (yes / true / on / 1)
  3. partially marked (neither yes nor no. Most often occurs when it comes to the properties of several objects, some of which have a certain property and others do not; see large picture.)
  4. deactivated and marked at the same time (deactivated checkboxes are used if another selection of the checkboxes is not possible; the selection status is specified by the application program and is only displayed for information purposes)
  5. deactivated and unchecked at the same time
  6. deactivated and at the same time partially marked (neither yes nor no)

With each mouse click on the checkbox, its status can be switched between marked (status 2) and not marked (status 1) and, if necessary, partially marked (status 3) and back. Sometimes it is deactivated by the software (state 4); this happens in special cases, for example if a selection affects the option elsewhere, and is shown as follows:

Checkboxes in practice - in this example, six files were selected in a file manager such as Windows Explorer and then the “Properties” display was called up, which generated this dialog window .
You can see the difference between partially marked and deactivated :
top: partially marked ,
middle: deactivated ( grayed out ) and marked at the same time ,
bottom: normally activated
  • the field is highlighted in color (e.g. with a dark gray background), the box does not react to mouse clicks. The preselection ( marked or not marked ) remains visible in many cases. Sometimes, however, the deposit is designed in such a way that the preselection cannot be recognized;
  • the checkbox is completely hidden

Usually there is a label to the right of the checkbox, which also causes the checkbox to be toggled with a mouse click; sometimes the font itself is changed by a mouse click. If the box is deactivated, the font is usually also displayed in a weaker form.

Checkboxes can be integrated into websites using HTML tags <input type="checkbox"> . By the input tag to the attributes of one checked, disabledor both supplements, the box will be selected, not selectable or selected and not editable.

Appearance

The appearance varies depending on the skin used . The most common variant is a square, in the selected state with a cross or tick. There are also different designs for the deactivated states , usually the box has a different color.

Sometimes you want to show a value that doesn't match yes or no. This is the case, for example, with tree selection lists if only some of the sub-elements are selected. It is similar with a properties dialog, in which the properties of several objects with different properties are summarized. Partially selected checkboxes are usually shown with a rectangle (instead of a tick). In the case of older skins in particular, checkboxes can also contain the normal symbol and be highlighted in color (e.g. the field has a light gray background).

Often several checkboxes are combined in a group for the selection of thematically related options. Despite this summary, the checkboxes behave independently of one another. This is the fundamental difference to radio buttons where only one option can be activated within a group. However, there are also special cases here: it is conceivable, for example, that at least one of a group of checkboxes must be activated and consequently it is not possible to deactivate the last activated checkbox. It can also be that the entire group is deactivated by a checkbox or a radio button on the higher level.

presentation

For information on the representation of corresponding graphic symbols from character sets, see article Checkmark (characters) .

Web links

Commons : Check boxes  - collection of pictures, videos and audio files