Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Home Flex Flex checkbox control example

Related Tutorials


Share on Google+Share on Google+

Flex checkbox control example

The page provides illustration about the working of flex checkbox control.

Flex checkbox control example


The page provides illustration about the working of flex checkbox control. Example is based on registration for online training courses. On the registration form, trainee check marks the courses in which he/she is interested. After that it clicks on Post button to send its request. For check marking flex check boxes are created and for posting flex button control is used. Functionalities like getting marked courses data and processing it, is achieved via two void functions Course_selected and Request_Process, created in the example.

Flex check boxes controls possess a box and a label. On the box, check marks are marked and with label, information regarding  the check box control is demonstrated.

Syntax for creating CheckBox control :


<?xml version = '1.0' encoding = 'ISO-8859-1'?>
  xmlns:mx = ''
  backgroundColor = '0x000000'
  backgroundGradientColors = '[#330033, #660000]'

  import mx.controls.*;

  <!-- method adds text to TextArea control -->  
  public function Course_Selected():void{
  txt.text = '';  
  txt.text += 'Java' + '\n';
  txt.text += 'Advanced Java Training' + '\n';
  txt.text += 'Mysql Training' + '\n';
  txt.text += 'JSP Training' + '\n';
  txt.text += 'Hibernate Training' + '\n';
  txt.text += 'Servlet Training' + '\n';
  <!-- function process the user checks result --> 
  public function Request_Process():void{
  if(txt.text == '')'Request rejected
  '\n' 'no course selected');
  else'Request send' + '\n' 
  'soon u will get a call from company');
  title = 'Roseindia Online Training Service'
  width = '50%' height = '60%'
  paddingBottom = '10' paddingTop = '10' 
  paddingLeft = '10' paddingRight = '10' 
  color= '#CCCCCC
  <mx:VBox color = '#330033'>
  id = 'Java'
  label = 'Core Java Training'
  click = 'Course_Selected()'
  iconColor= '#66FF33'/>
  id = 'Advanced_Java'
  label = 'Advanced Java Training'
  click = 'Course_Selected()'
  iconColor = '#3300FF'/>
  id = 'Mysql'
  label = 'Mysql Training'
  click = 'Course_Selected()'
  iconColor = '#660000'/>
  id = 'JSP'
  label = 'JSP Training'
  click = 'Course_Selected()'
  iconColor = '#336600'/>
  id = 'Hibernate'
  label = 'Hibernate Training'
  click = 'Course_Selected()'
  iconColor = '#33CC66'/>
  id = 'Servlet'
  label = 'Servlet Training'
  click = 'Course_Selected()'
  iconColor = '#330000'/>
  <mx:VBox width = '100%' height = '100%'>
  <mx:Label text = 'Shopping items list'/>
  id = 'item_delivery'  
  label = 'Post
  click = 'Request_Process()'
  color = '#000000'
  y = '200'
  id = 'txt
  width = '100%' height = '100%'
  verticalScrollPolicy = 'off
  editable = 'false'
  color = '#000033'






Download the code


If you enjoyed this post then why not add us on Google+? Add us to your Circles

Liked it!  Share this Tutorial

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: June 9, 2009

Related Tutorials

Discuss: Flex checkbox control example  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image