Advanced JavaScript Library
 
 
 
System.Controls.CheckBox
Home > Documentation > 3.0 Controls > System.Controls.CheckBox
Developed by Exbos Limited.

Summary
A simple css themed check box with hover states but created exposing all methods of the base Control classes. The checkbox control handles themed hover states automatically. By sub classing the control class the checkbox provides significant extra functionality above the normal element such as anchoring and dragging.

Example
var checkExample;

// Create CheckBox
checkExample = System.CreateObject("System.Controls.CheckBox");
checkExample.Initialize();

// Set Text
checkExample.SetText("My CheckBox");
Methods
Initialize GetText SetText GetSelected SetSelected

Events
OnChange

Initialize ()

Summary
The Initialize method is supported by all controls that inherit from the System.Controls.Control class. The method performs the actual creation of the control and the attachment to the document object model. The call is often overridden by its child classes to perform any additional object initialization that might be required. Please note the Initilize method of the Accordion Panel does not need to be called directly as it is called by the AddPanel method of the Accordion control.

Parameters
This method has no parameters.

Return Value
This method does not return a value.

Example
var checkExample;

// Create CheckBox
checkExample = System.CreateObject("System.Controls.CheckBox");
checkExample.Initialize();
GetText ()

Summary
This method gets the text currently displayed agains the check image by the control. The text is for visual purposes only and does not impact the selected state of the control.

Parameters
This method has no parameters.

Return Value
This method does not return a value.

Example
var checkExample;

// Create CheckBox
checkExample = System.CreateObject("System.Controls.CheckBox");
checkExample.Initialize();

// Show Text
System.MessageBox("Check Box", checkExample.GetText());
SetText ()

Summary
This method sets the text to be displayed agains the check image by the control. The text is for visual purposes only and does not impact the selected state of the control.

Parameters
This method has no parameters.

Return Value
This method does not return a value.

Example
var checkExample;

// Create CheckBox
checkExample = System.CreateObject("System.Controls.CheckBox");
checkExample.Initialize();

// Set Text
checkExample.SetText("My CheckBox");
GetSelected ()

Summary
This method gets the currently set selected state. If the check box is checked the method returns true otherwise false.

Parameters
This method has no parameters.

Return Value
The currently selected state of the checkbox.

Example
var checkExample;

// Create CheckBox
checkExample = System.CreateObject("System.Controls.CheckBox");
checkExample.Initialize();

// Get Selected State
System.MessageBox("Check Box", checkExample.GetSelected().toString());
SetSelected (bSelected)

Summary
This method sets the selected state of the control. If set to true the checkbox will update to the checked state. If set to face the checkbox will update to the un-checked state.

Parameters
Parameter Description
bSelected The selected state to be set for the checkbox.

Return Value
This method does not return a value.

Example
var checkExample;

// Create CheckBox
checkExample = System.CreateObject("System.Controls.CheckBox");
checkExample.Initialize();

// Set Selected State
checkExample.SetSelected(true);
OnChange (eventData) [Event]

Summary
The OnChange event is triggered when the selected state on this checkbox control is changed. The change can be from user input of from script.

Parameters
Parameter Description
eventData Object containing any data relevant to this event.

Return Value
This method does not return a value.

Example
// Create handling function
function EvOnChange(eventData)
{
     // Do change work
}

var checkExample;

// Create CheckBox
checkExample = System.CreateObject("System.Controls.CheckBox");
checkExample.Initialize();

// Attach to date cahnge
checkExample.OnChange.AddHandler(EvOnChange);
 
Shopping Basket
Your shopping basket is currently empty.
 
 
RSS Feed   Powered By Commerce Cloud
This site is powered by the Commerce Cloud Engine. Copyright (c) 2009 Exbos Limited. All Rights Reserved. SiteMap   Cookie Policy
Web site design and layout by Exbos Ltd. Copyright (c) 2010 Exbos Ltd. All Rights Reserved.
Exbos Ltd - Publishers of Print Cloud - the complete Printers online toolkit in one package