mx.containers
Class Form



class Form
extends mx.containers.Container

The Form container lets you control the layout of a form, mark form fields as required or optional, handle error messages, and bind your form data to the Flex data model in order to perform data checking and validation. Also, you can apply style sheets to configure the appearance of your forms.

The <mx:Form> tag defines the container for the entire form. Use the <mx:FormHeading> tag and the <mx:FormItem> tag to define content. You can also insert other types of containers in a Form container.

MXML Syntax

The <mx:Form> tag inherits all the properties of its parent classes, and the following properties:

 <mx:Form
indicatorGap="16"
labelWidth="Default value is length of longest label in the Form."
marginBottom="16"
marginLeft="16"
margingRight="16"
marginTop="16"
verticalGap="6">
...
child tags
...
/>

See Also
mx.containers.FormHeading
mx.containers.FormItem



Methods

Methods inherited from class mx.containers.Container
Constructor  getViewMetrics 

Methods inherited from class mx.core.View
init  draw  createChild  getChildAt  getChildIndex  setChildIndex  destroyAllChildren  destroyChild  destroyChildAt  getViewMetrics 

Methods inherited from class mx.core.UIComponent
getFocus  setFocus  getFocusManager 

Methods inherited from class mx.core.UIObject
createAccessibilityImplementation  measure  doLater  cancelAllDoLaters  invalidate  invalidateStyle  invalidateProperties  invalidateSize  redraw  move  setSize  setSizeNoLayout  drawRect  fillRect  destroyLabel  createClassObject  createEmptyObject  destroyObject  getStyle  setMask  swapDepths 


Properties

Properties inherited from class mx.containers.Container
version  className  numRepeaters  icon  autoLayout  defaultButton  childDescriptors  creationPolicy  clipContent  hScrollPolicy  vScrollPolicy  maxVPosition  maxHPosition  vLineScrollSize  hLineScrollSize  vPageScrollSize  hPageScrollSize  hPosition  vPosition 

Properties inherited from class mx.core.View
version  className  numChildren 

Properties inherited from class mx.core.UIComponent
version  enabled  tabIndex 

Properties inherited from class mx.core.UIObject
version  nestLevel  dispatchEvent  addEventListener  handleEvent  removeEventListener  kStretch  styleName  className  setStyle  parentApplication  isDocument  parentDocument  documentDescriptor  descriptor  instanceIndices  repeaterIndices  getRepeaterItem  id  width  height  x  y  minHeight  minWidth  preferredHeight  preferredWidth  maxHeight  maxWidth  widthFlex  heightFlex  visible  scaleX  scaleY  alpha  depth  mouseX  mouseY  toolTip  baselinePosition 


Effects

Effects inherited from class mx.core.UIComponent
showEffect  hideEffect  focusInEffect  focusOutEffect 

Effects inherited from class mx.core.UIObject
creationCompleteEffect  moveEffect  resizeEffect  mouseDownEffect  mouseOverEffect  mouseOutEffect  mouseUpEffect 


Events

Events inherited from class: mx.containers.Container
childrenCreated  scroll 

Events inherited from class: mx.core.View
childCreated  childIndexChanged  childDestroyed 

Events inherited from class: mx.core.UIComponent
focusIn  focusOut  keyDown  keyUp  show  hide  valid  invalid  valueCommitted 

Events inherited from class: mx.core.UIObject
initialize  creationComplete  resize  move  draw  load  unload  mouseDown  mouseUp  mouseMove  mouseOver  mouseOut  mouseDownSomewhere  mouseUpSomewhere  mouseMoveSomewhere  mouseChangeSomewhere  effectStart  effectEnd  dragBegin  dragComplete  dragEnter  dragOver  dragExit  dragDrop 


Styles
marginBottom Type: Number   Format: Length   CSS Inheritance: no
Number of pixels between the container`s bottom border and its content area. The default value is 16.
marginTop Type: Number   Format: Length   CSS Inheritance: no
Number of pixels between the container`s top border and its content area. The default value is 16.
verticalGap Type: Number   Format: Length   CSS Inheritance: no
Number of pixels between children in the vertical direction. The default is 8.
labelWidth Type: Number   Format: Length   CSS Inheritance: yes
Width of the form labels. The default is the length of the longest label in the form.
indicatorGap Type: Number   Format: Length   CSS Inheritance: yes
Number of pixels between the label and child components. The default value is 14.

Styles inherited from class mx.core.UIComponent
backgroundColor  backgroundDisabledColor  backgroundImage  backgroundAlpha  backgroundSize  barColor  borderCapColor  borderColor  buttonColor  borderStyle  disabledColor  errorColor  highlightColor  lineHeight  modalTransparency  scrollTrackColor  shadowColor  shadowCapColor  symbolColor  symbolBackgroundColor  symbolBackgroundDisabledColor  symbolBackgroundPressedColor  symbolDisabledColor  themeColor 

Styles inherited from class mx.core.UIObject
color  fontFamily  fontSize  fontStyle  fontWeight  textAlign  textDecoration  textIndent  marginLeft  marginRight  horizontalGap  verticalGap