小小菜鸟的web菜园子

web开发学习。好记性不如烂笔头。每天进步一点点!

导航

设置Slider组件TIP的偏移量.

dataTipOffset样式学习.
示例:

代码:

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/05/09/setting-the-data-tip-offset-in-a-slider-control-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout
="vertical"
        verticalAlign
="middle"
        backgroundColor
="white">

    
<mx:Script>
        
<![CDATA[
            private function init():void {
                slider.value = slider.getStyle("dataTipOffset");
            }
        
]]>
    
</mx:Script>

    
<mx:Form>
        
<mx:FormItem label="dataTipOffset:" direction="horizontal">
            
<mx:HSlider id="slider"
                    minimum
="-10"
                    maximum
="30"
                    snapInterval
="1"
                    tickInterval
="5"
                    liveDragging
="true"
                    dataTipOffset
="{slider.value}"
                    dataTipPrecision
="0"
                    showTrackHighlight
="true"
                    initialize
="init();" />
            
<mx:Label text="{slider.value}" width="30" />
        
</mx:FormItem>
    
</mx:Form>

</mx:Application>

posted on 2008-05-10 20:11  『小小菜鸟』  阅读(399)  评论(0编辑  收藏  举报