{{Template:GUI_Object|checkbox|[wiki:GUI_-_Properties#buffer_zone buffer_zone], caption, cell_id, checked, font, sprite, sprite_over, sprite_pressed, sprite_disabled, sprite2, sprite2_over, sprite2_pressed, sprite2_disabled, textcolor, textcolor_over, textcolor_pressed, textcolor_disabled, tooltip, tooltip_style|none}}

A Check-box is a control that defines a boolean value, i.e. true or false. It contains a squared sprite and text next to it.

The square itself can have 8 different kinds of sprites (although many are optional): false, false-over, false-pressed and false-disabled, true, true-over, true-pressed, true-disabled ... false and true being checked="true" and checked="false". sprite represents false, and sprite2 true.

By pressing the Check-box one can change its value (using the same behaviour as a button); that includes the text too.

Image:gui-object-checkbox.png?

Code of example checkboxes:

  <object type="checkbox" 
          size="20 20 200 40"
          sprite="gd-check-false"
          sprite2="gd-check-true"
          square_side="16"
          checked="false"
          font="verdana12"
          textcolor="0 0 0"
  >Checkbox
  </object>
  
  <object type="radiobutton" 
          size="20 50 200 70"
          sprite="gd-check-false"
          sprite2="gd-check-true"
          square_side="16"
          checked="true"
          font="verdana12"
          textcolor="0 0 0"
  >This is a checkbox that spans more than just one row.
  </object>
Last modified 11 years ago Last modified on Feb 23, 2008, 4:18:58 AM