Flex Form Control-CheckBox Control - Adobe Flex

What is the use of check box control in flex?

CheckBox component represents a checkbox and an optional label.When the user clicks a CheckBox component or its text, then CheckBox component sets its selected property to true for checked, and to false for unchecked.

Class declaration

Following is the declaration for spark.components.CheckBox class:

Public methods

S.N.

Method & Description

1

CheckBox()

Constructor.

Methods inherited

This class inherits methods from the following classes:

  • spark.components.supportClasses.ToggleButtonBase
  • spark.components.supportClasses.ButtonBase
  • spark.components.supportClasses.SkinnableComponent
  • mx.core.UIComponent
  • mx.core.FlexSprite
  • flash.display.Sprite
  • flash.display.DisplayObjectContainer
  • flash.display.InteractiveObject
  • flash.display.DisplayObject
  • flash.events.EventDispatcher
  • Object

Flex CheckBox Control Example

Let us follow the following steps to check usage of CheckBox control in a Flex application by creating a test application:

Step

Description

1

Create a project with a nameHelloWorldunder a packagecom.wisdomjobs.client

2

ModifyHelloWorld.mxmlas explained below and ski rest of the file.

3

Compile and run the application to make sure business logic is working as per the requirements.

Following is the content of the modified mxml file src/com.wisdomjobs/HelloWorld.mxml.

After all the changes are done, compile and run the application in normal mode as we did in Flex - Create Application chapter. If everything works fine in the application, it produces below output

check box

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Adobe Flex Topics