flex学习笔记 显示数字步进

Posted on 2013-07-24 11:00  诸葛小北  阅读(210)  评论(0编辑  收藏  举报
<?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:Script>
        <![CDATA[
            import mx.controls.Alert;
            public function showMsg(msg:String):void
            {
             mx.controls.Alert.show(msg);
            }
        ]]>
    </fx:Script>
    <s:Panel title="Profile" >
        <s:layout>
            <s:HorizontalLayout    />
        </s:layout>
        <s:VGroup>
            <s:Label fontWeight="bold" text="你有几个孩子阿"/>
            <s:NumericStepper id="Kids" minimum="0" maximum="10" change="showMsg(Kids.value.toString())"/>
            
            <s:HGroup>
                <s:Label fontWeight="bold" text="读大学的孩子呢"/>
                <s:Spinner minimum="0" maximum="10" id="collegeKids"/>
                <s:Label text="{collegeKids.value}个孩子读大学"/>
            </s:HGroup>            
            <mx:HSlider id="commuteTimeRange" minimum="0" maximum="180" snapInterval="5" tickInterval="10"  labels="[0min,180max]" thumbCount="2" change="showMsg(commuteTimeRange.value.toString())" />
        </s:VGroup>    
        <s:VGroup>
            <s:Label fontWeight="bold" text="你多高?(cm)"/>
            <mx:VSlider id="YourHeight" minimum="0" maximum="300" snapInterval="1" tickInterval="1" labels="[0,50,100,150,200,250,300]" 
                         change="showMsg(YourHeight.value.toString())">
                
            </mx:VSlider>
        </s:VGroup>
        
    
        
    </s:Panel>
</s:Application>
View Code

显示数字步进

数字步进无框

数字横竖滑条

Copyright © 2024 诸葛小北
Powered by .NET 8.0 on Kubernetes