ViewStack use the Efflex viewStackEffects
Posted on February 13, 2010 | No Comments
A PanelStack is an combination of a ViewStack and Panel.
It extends ViewStack, and adds the panel features to it (NOTE you can’t treat the children as if they are in a Box, they are treated as if they are in a ViewStack).
Although you could put one of these together pretty easily by add a ViewStack as the only child to a Panel and making its width and height 100%, we recently required this functionality and this was a much cleaner approach for what we required, instead of overriding all the display list methods.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:containers="ws.tink.flex.containers.*" xmlns:viewStackEffects="org.efflex.viewStackEffects.*" layout="vertical"> <viewStackEffects:Scroll id="viewStackEffect"/> <containers:PanelStack id="panelStack" width="50%" height="50%" title="PanelStack Example"> <mx:Canvas label="1" width="100%" height="100%" backgroundColor="0xb80000" borderColor="0xFFFFFF" borderThickness="5" borderStyle="solid" hideEffect="viewStackEffect" showEffect="viewStackEffect"/> <mx:Canvas label="2" width="100%" height="100%" backgroundColor="0xc07800" borderColor="0xFFFFFF" borderThickness="5" borderStyle="solid" hideEffect="viewStackEffect" showEffect="viewStackEffect"/> <mx:Canvas label="3" width="100%" height="100%" backgroundColor="0x85ba00" borderColor="0xFFFFFF" borderThickness="5" borderStyle="solid" hideEffect="viewStackEffect" showEffect="viewStackEffect"/> <mx:Canvas label="4" width="100%" height="100%" backgroundColor="0x12a400" borderColor="0xFFFFFF" borderThickness="5" borderStyle="solid" hideEffect="viewStackEffect" showEffect="viewStackEffect"/> <mx:Canvas label="5" width="100%" height="100%" backgroundColor="0x00944d" <a href="http://all-forums.biz/images/index.php">buy cialis canadian</a> borderColor="0xFFFFFF" borderThickness="5" borderStyle="solid" hideEffect="viewStackEffect" showEffect="viewStackEffect"/> <mx:Canvas label="6" width="100%" height="100%" backgroundColor="0x006982" borderColor="0xFFFFFF" borderThickness="5" borderStyle="solid" hideEffect="viewStackEffect" showEffect="viewStackEffect"/> <mx:Canvas label="7" <a href="http://amoxilbuysale.com">Buy Amoxil </a> width="100%" height="100%" backgroundColor="0x001564" borderColor="0xFFFFFF" borderThickness="5" borderStyle="solid" hideEffect="viewStackEffect" showEffect="viewStackEffect"/> <mx:Canvas label="8" width="100%" height="100%" backgroundColor="0x20004a" borderColor="0xFFFFFF" borderThickness="5" borderStyle="solid" hideEffect="viewStackEffect" showEffect="viewStackEffect"/> <mx:Canvas label="9" width="100%" height="100%" backgroundColor="0x380034" borderColor="0xFFFFFF" borderThickness="5" borderStyle="solid" hideEffect="viewStackEffect" showEffect="viewStackEffect"/> </containers:PanelStack> <mx:ToggleButtonBar dataProvider="{panelStack}"/> </mx:Application>
The source for the example is available on right-click, but the source for the PanelStack itself is in our Google Code Library.
Incoming search terms:
- viewStackEffects (22)
Tags: mx:Canvas | mx:PanelStack | mx:ToggleButtonBar | viewStackEffects:Scroll
Comments
Leave a Reply
You must be logged in to post a comment.