Name: | CheckBox |
Version: | 1.0 |
ID: | ID_CHECKBOX |
Status: | Beta |
Category: | GUI |
Date: | November 2003 |
Author: | Rocklyte Systems |
Copyright: | Rocklyte Systems, 2003. All rights reserved. |
Short: | The CheckBox class manages check boxes in the user interface. |
The CheckBox class simplifies the creation and management of checkboxes as part of the user interface. Check boxes are simple gadgets that are limited to exhibiting an on/off state. By default, a checkbox that is turned off will be empty, and when turned on it will display a checkmark. The CheckBox class allows for its graphics to be edited, so you can redefine how the on/off states are displayed.
The definitions for new checkboxes are loaded by default from the environment file "templates:checkboxdef.xml". You can change the template file prior to initialisation by setting the Template field. Note that any values set in the template will override your original field settings for the checkbox.
Depending on your requirements, you may need to configure the checkbox so that when its state changes, it performs an action. There are three acceptable methods that you can use to achieve this. The first is to set the ActionScript field so that it refers to a script that executes when the checkbox changes. The second is to initialise child objects to the checkbox and they will be executed on activation. The third option is to listen to the Activate action by calling the SubscribeAction() function on the checkbox.
The CheckBox class supports the following actions:
Activate Activates the checkbox. Disable Disables the checkbox. Enable Turns the checkbox on if it has been disabled. Focus Sets the focus on the checkbox and activates keyboard monitoring. Hide Removes the checkbox from the display. LostFocus Removes the focus from the checkbox and disables key monitoring. MoveToBack Moves the checkbox to the back of the display area. MoveToFront Moves the checkbox to the front of the display area. Redimension Changes the size and position of the checkbox. Resize Alters the size of the checkbox. Show Puts the checkbox on display. UserClick Emulates a user click on the checkbox. UserMovement Emulates user movement over the checkbox.
The CheckBox object consists of the following public fields:
ActionScript Script to be executed when the checkbox is clicked. Border String-based field for setting a single-colour border for the checkbox. Bottom The bottom coordinate of the checkbox. CheckImage Defines the image that is displayed when the checkbox state is set to 'on'. ClickFrame The graphics frame to display when the checkbox is clicked. Colour String-based field for setting the colour inside of the checkbox. ColourRGB Defines the internal colour of the checkbox in RGB format. Disable Disables the checkbox on initalisation. Drawable The drawable that will contain the checkbox graphic. EnterFrame The graphics frame to display when the user's pointer enters the checkbox area. ExitFrame The graphics frame to display when the user's pointer leaves the checkbox area. Flags Optional flags may be set here. Height Defines the height of a checkbox. Highlight String-based field for setting the checkbox highlight. HighlightRGB Defines border highlight of the checkbox, in RGB format. Label The label is a string displayed to the left of the input area. Region The drawable that represents the checkbox is referenced through this field. ReleaseFrame The graphics frame to display when a user-click is released. Right The right coordinate of the checkbox. Shadow String-based field for setting the checkbox shadow. ShadowRGB Defines border shadow of the checkbox, in RGB format. TabFocus Set this field to a TabFocus object to register the checkbox in a tab-list. Template Defines the makeup of the checkbox using a pre-defined template. Value Indicates the current TRUE/FALSE status for the checkbox. Width Defines the width of a checkbox. XCoord The horizontal position of a checkbox. XOffset The horizontal offset of a checkbox. YCoord The vertical position of a checkbox. YOffset The vertical offset of a checkbox.
Field: | Border | |
Short: | String-based field for setting a single-colour border for the checkbox. | |
Type: | STRING | |
Status: | Set | |
|
Field: | Bottom | |
Short: | The bottom coordinate of the checkbox. | |
Type: | LONG | |
Status: | Get | |
|
Field: | CheckImage | |
Short: | Defines the image that is displayed when the checkbox state is set to 'on'. | |
Type: | LONG | |
Status: | Set | |
|
Field: | ClickFrame | |
Short: | The graphics frame to display when the checkbox is clicked. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | Colour | |
Short: | String-based field for setting the colour inside of the checkbox. | |
Type: | STRING | |
Status: | Set | |
|
Field: | ColourRGB | |
Short: | Defines the internal colour of the checkbox in RGB format. | |
Type: | RGB | |
Status: | Read | |
|
Field: | Disable | |
Short: | Disables the checkbox on initalisation. | |
Type: | BOOLEAN | |
Status: | Get/Set | |
|
Field: | Drawable | |
Short: | The drawable that will contain the checkbox graphic. | |
Type: | OBJECTID | |
Status: | Read/Init | |
|
Field: | EnterFrame | |
Short: | The graphics frame to display when the user's pointer enters the checkbox area. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | ExitFrame | |
Short: | The graphics frame to display when the user's pointer leaves the checkbox area. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | Flags | |||||||||
Short: | Optional flags may be set here. | |||||||||
Type: | LONG | |||||||||
Status: | Read/Init | |||||||||
|
Field: | Height | |
Short: | Defines the height of a checkbox. | |
Type: | DOUBLE/PERCENTAGE | |
Status: | Get/Set | |
|
Field: | Highlight | |
Short: | String-based field for setting the checkbox highlight. | |
Type: | STRING | |
Status: | Set | |
|
Field: | HighlightRGB | |
Short: | Defines border highlight of the checkbox, in RGB format. | |
Type: | RGB | |
Status: | Read | |
|
Field: | Label | |
Short: | The label is a string displayed to the left of the input area. | |
Type: | STRING | |
Status: | Get/Set | |
|
Field: | Region | |
Short: | The drawable that represents the checkbox is referenced through this field. | |
Type: | OBJECTID | |
Status: | Read | |
|
Field: | ReleaseFrame | |
Short: | The graphics frame to display when a user-click is released. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | Right | |
Short: | The right coordinate of the checkbox. | |
Type: | LONG | |
Status: | Get | |
|
Field: | Shadow | |
Short: | String-based field for setting the checkbox shadow. | |
Type: | STRING | |
Status: | Set | |
|
Field: | ShadowRGB | |
Short: | Defines border shadow of the checkbox, in RGB format. | |
Type: | RGB | |
Status: | Read | |
|
Field: | TabFocus | |
Short: | Set this field to a TabFocus object to register the checkbox in a tab-list. | |
Type: | OBJECTID | |
Status: | Set | |
|
Field: | Template | |
Short: | Defines the makeup of the checkbox using a pre-defined template. | |
Type: | STRING | |
Status: | Init | |
|
Field: | Value | |
Short: | Indicates the current TRUE/FALSE status for the checkbox. | |
Type: | BOOLEAN | |
Status: | Read/Set | |
|
Field: | Width | |
Short: | Defines the width of a checkbox. | |
Type: | DOUBLE/PERCENTAGE | |
Status: | Get/Set | |
|
Field: | XCoord | |
Short: | The horizontal position of a checkbox. | |
Type: | DOUBLE/PERCENTAGE | |
Status: | Get/Set | |
|
Field: | XOffset | |
Short: | The horizontal offset of a checkbox. | |
Type: | DOUBLE/PERCENTAGE | |
Status: | Get/Set | |
|
Field: | YCoord | |
Short: | The vertical position of a checkbox. | |
Type: | DOUBLE/PERCENTAGE | |
Status: | Get/Set | |
|
Field: | YOffset | |
Short: | The vertical offset of a checkbox. | |
Type: | DOUBLE/PERCENTAGE | |
Status: | Get/Set | |
|