mx.containers
Class ViewStack


Direct Known Subclasses
           mx.containers.TabNavigator

class ViewStack
extends mx.containers.Container

A ViewStack navigator container consists of a collection of child containers stacked on top of each other with only one container visible, or active, at a time. The ViewStack container does not define a built-in mechanism for users to switch the currently active container; you must use a LinkBar navigator or build the logic yourself in ActionScript to let users change the currently active child. For example, you could define a set of Button controls that switch among the child containers.

MXML Syntax

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

 <mx:ViewStack
historyManagement="true|false"
marginTop="0"
marginBottom="0"
selectedIndex="0"
change="Event handler; no default."
changeEffect="Event handler; no default.">
...
child tags
...
/>

See Also
mx.containers.LinkBar
mx.managers.HistoryManager
mx.managers.LayoutManager



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
staticversion:String  
ComponentVersion is for internal use only.
      historyManagement:Boolean   [Read-Write]
If true, enables history management.
      selectedChild:UIObject   [Read-Write]
Name of the active container when the ViewStack container loads.
      selectedIndex:Number   [Read-Write]
Specifies the index of the active container when the ViewStack container loads.

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
changeEffectEffect to play when the currently active view changes.

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
changeBroadcast when the current view changes. The event object contains the following properties:
- newValue contains the index of the child that is about to be selected.
- prevValue contains the index of the child that was previously selected.
Target contains a reference to the component that triggered the event. Type contains the name of the event.

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 0.
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 0.

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 


Property Detail

historyManagement

historyManagement:Boolean   [Read-Write]

If true, enables history management. The default is true.


selectedChild

selectedChild:UIObject   [Read-Write]

Name of the active container when the ViewStack container loads. The default is the identifier of the first child container defined in the ViewStack container. You can only set this property in an ActionScript statement, not in MXML.


selectedIndex

selectedIndex:Number   [Read-Write]

Specifies the index of the active container when the ViewStack container loads. Indexes are in the range of 0, 1, 2, ... , n - 1, where n is the number of child containers. The default is 0, corresponding to the first child container defined in the ViewStack container.


version

static version:String  

ComponentVersion is for internal use only.