# inputEx-library

### inputEx 0.5.1

inputEx-library > inputEx > inputEx.CheckBox
Search:
Filters Show Private Show Protected Show Deprecated

## Class inputEx.CheckBox - extends inputEx.Field

Create a checkbox.

### Constructor

inputEx.CheckBox `( options )`

Parameters:
  `options <Object>` Added options for CheckBoxes:
  - sentValues: 2D vector of values for checked/unchecked states (default is [true, false])

#### Properties inherited from inputEx.Field:

`options`

### Methods

#### disable

`void disable ( )`
Disable the field

#### enable

`void enable ( )`
Enable the field

#### getValue

`Any getValue ( )`
Get the state value

Returns: `Any`
  one of [checkedValue,uncheckedValue]

#### initEvents

`void initEvents ( )`
Clear the previous events and listen for the "change" event

#### onChange

`void onChange ( e )`
Function called when the checkbox is toggled

Parameters:
  `e <Event>` The original 'change' event

#### renderComponent

`void renderComponent ( )`
Render the checkbox and the hidden field

#### setOptions

`void setOptions ( options )`
Adds the CheckBox specific options

Parameters:
  `options <Object>` Options object as passed to the constructor

#### setValue

`void setValue ( value , [sendUpdatedEvt] )`
Set the value of the checkedbox

Parameters:
  `value <Any>` The value schould be one of [checkedValue,uncheckedValue]
  `[sendUpdatedEvt] <boolean>` (optional) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event)

#### Methods inherited from inputEx.Field:

`clear, close, destroy, disable, displayMessage, enable, fireUpdatedEvt, focus, getEl, getParentField, getState, getStateString, getValue, hide, initEvents, isDisabled, isEmpty, onBlur, onChange, onFocus, render, renderComponent, setClassFromState, setFieldName, setOptions, setParentField, setValue, show, validate`

#### Events inherited from inputEx.Field:

`updatedEvt,`

Copyright © 2010 Eric Abouaf All rights reserved.