# FormCheckBox

A check box item. Check boxes are used mainly in two cases. The first case is when a simple yes/no response is required. The second case is when multiple selections from a number options is permitted. In this case each option will be presented by a separate check box.

## Example

form = pf.Form.New("Export settings")

-- Create check boxes

checkbox1 = pf.FormCheckBox.New("Export electric near fields.")
checkbox1.Checked = true
checkbox2 = pf.FormCheckBox.New("Export magnetic near fields.")

-- Add check boxes to 'Form' layout

-- Run the form and retrieve the user input

form:Run()
mustExportEFields = checkbox1.Checked
mustExportHFields = checkbox2.Checked


## Inheritance

The FormCheckBox object is derived from the FormItem object.

## Property List

Checked
The state of the check box. True indicates that the box is checked, false indicates that it is unchecked. (Read/Write boolean)
Enabled
Controls the item enabled state. Setting the enabled state of an item to false will also disable items or their contents. (Read/Write boolean)
FixedHeight
The fixed height of the item in pixels. When the fixed height is set to a positive value, it is the height of the item. Setting the fixed height to zero or a negative value will restore the default/auto setting and the height will be dynamically determined. The fixed height takes precedence over the minimum height and thus the minimum height is ignored when a fixed height is set. (Read/Write number)
FixedWidth
The fixed width of the item in pixels. When the fixed width is set to a positive value, it is the width of the item. Setting the fixed width to zero or a negative value will restore the default/auto setting and the width will be dynamically determined. The fixed width takes precedence over the minimum width and thus the minimum width is ignored when a fixed width is set. (Read/Write number)
ItemHeight
The height of the item in pixels. (Read only number)
ItemWidth
The width of the item in pixels. (Read only number)
Label
The label of the push button. (Read/Write string)
MinimumHeight
The minimum height of the item in pixels. When the height is dynamically determined, it will not be less than the minimum height setting. The minimum height value will only be used when the FixedWidth is not set (restored to the default/auto setting). Setting the minimum height to zero or a negative value will restore the default/auto setting where no minimum height is enforced. (Read/Write number)
MinimumWidth
The minimum width of the item in pixels. When the width is dynamically determined, it will not be less than the minimum width setting. The minimum width value will only be used when the FixedWidth is not set (restored to the default/auto setting). Setting the minimum width to zero or a negative value will restore the default/auto setting where no minimum width is enforced. (Read/Write number)
Type
The object type string. (Read only string)
Visible
Controls the item visibility. Setting the visibility of an item to false will also hide items or their contents. (Read/Write boolean)

## Method List

ClearCallBack ()
Clear the function that will be called when the check box state changes.
SetCallBack (callback function)
Set the function that will be called when the check box state changes.

## Constructor Function List

New (label string)
Create a new check box item. The text describing the check box is determined by the specified label. (Returns a FormCheckBox object.)
New ()
Create a new check box item. (Returns a FormCheckBox object.)

## Property Details

Checked
The state of the check box. True indicates that the box is checked, false indicates that it is unchecked.
Type
boolean
Access
Enabled
Controls the item enabled state. Setting the enabled state of an item to false will also disable items or their contents.
Type
boolean
Access
FixedHeight
The fixed height of the item in pixels. When the fixed height is set to a positive value, it is the height of the item. Setting the fixed height to zero or a negative value will restore the default/auto setting and the height will be dynamically determined. The fixed height takes precedence over the minimum height and thus the minimum height is ignored when a fixed height is set.
Type
number
Access
FixedWidth
The fixed width of the item in pixels. When the fixed width is set to a positive value, it is the width of the item. Setting the fixed width to zero or a negative value will restore the default/auto setting and the width will be dynamically determined. The fixed width takes precedence over the minimum width and thus the minimum width is ignored when a fixed width is set.
Type
number
Access
ItemHeight
The height of the item in pixels.
Type
number
Access
ItemWidth
The width of the item in pixels.
Type
number
Access
Label
The label of the push button.
Type
string
Access
MinimumHeight
The minimum height of the item in pixels. When the height is dynamically determined, it will not be less than the minimum height setting. The minimum height value will only be used when the FixedWidth is not set (restored to the default/auto setting). Setting the minimum height to zero or a negative value will restore the default/auto setting where no minimum height is enforced.
Type
number
Access
MinimumWidth
The minimum width of the item in pixels. When the width is dynamically determined, it will not be less than the minimum width setting. The minimum width value will only be used when the FixedWidth is not set (restored to the default/auto setting). Setting the minimum width to zero or a negative value will restore the default/auto setting where no minimum width is enforced.
Type
number
Access
Type
The object type string.
Type
string
Access
Visible
Controls the item visibility. Setting the visibility of an item to false will also hide items or their contents.
Type
boolean
Access

## Method Details

ClearCallBack ()
Clear the function that will be called when the check box state changes.
SetCallBack (callback function)
Set the function that will be called when the check box state changes.
Input Parameters
callback(function)
The function call back.

## Static Function Details

New (label string)
Create a new check box item. The text describing the check box is determined by the specified label.
Input Parameters
label(string)
The label describing the check box.
Return
FormCheckBox
A check box form item created with the specified label.
New ()
Create a new check box item.
Return
FormCheckBox
A check box form item created with the specified label.