计数器控件实例
书:158
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Declarations> <!-- 将非可视元素(例如服务、值对象)放在此处 --> </fx:Declarations> <!-- 计数器控件实例 --> <mx:Panel title="计数器控件实例" height="50%" width="50%" paddingTop="10" paddingLeft="10"> <mx:Label text="默认的计数器最小值为0,最大值为10,计数间隔为1." color="blue" fontSize="14" width="100%"/> <mx:NumericStepper/> <mx:Label text="默认的计数器最小值为10,最大值为40,计数间隔为0.01,初始数值为20." color="blue" fontSize="14" width="100%"/> <mx:NumericStepper id="ns" minimum="10" maximum="40" stepSize="0.01" value="20.00" width="65"/> <mx:Label text="你选择了:{ns.value}" color="blue" fontSize="14" /> </mx:Panel> </s:Application>