<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flex Examples &#187; dataTipOffset</title>
	<atom:link href="http://blog.flexexamples.com/tag/datatipoffset/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting the data tip offset in a Slider control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/09/setting-the-data-tip-offset-in-a-slider-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/09/setting-the-data-tip-offset-in-a-slider-control-in-flex/#comments</comments>
		<pubDate>Sat, 10 May 2008 06:37:43 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HSlider]]></category>
		<category><![CDATA[Slider]]></category>
		<category><![CDATA[VSlider]]></category>
		<category><![CDATA[dataTipOffset]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/09/setting-the-data-tip-offset-in-a-slider-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can control the data tip offset in a Flex HSlider control by setting the dataTipOffset style.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Slider_dataTipOffset_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/05/09/setting-the-data-tip-offset-in-a-slider-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Script&#62; &#60;![CDATA[ private function init():void { slider.value = slider.getStyle("dataTipOffset"); } ]]&#62; &#60;/mx:Script&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can control the data tip offset in a Flex HSlider control by setting the <code>dataTipOffset</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-625"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Slider_dataTipOffset_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/09/setting-the-data-tip-offset-in-a-slider-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

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

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

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Slider_dataTipOffset_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/Slider_dataTipOffset_test/bin/main.html" width="100%" height="150"></iframe></p>
<p>And due to popular demand, here is the &#8220;same&#8221; example, in ActionScript:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Slider_dataTipOffset_test_2/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/09/setting-the-data-tip-offset-in-a-slider-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:comps="comps.*"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;comps:MySlider /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Slider_dataTipOffset_test_2/bin/srcview/source/comps/MySlider.as.html">comps/MySlider.as</a></p>
<pre class="code">
package comps {
    import mx.containers.Form;
    import mx.containers.FormItem;
    import mx.containers.FormItemDirection;
    import mx.controls.HSlider;
    import mx.controls.Label;
    import mx.events.SliderEvent;

    public class MySlider extends Form {
        public var slider:HSlider
        public var lbl:Label;
        public var formItem:FormItem;

        public function MySlider() {
            super();
            init();
        }

        private function init():void {
            slider = new HSlider();
            slider.minimum = -10;
            slider.maximum = 30;
            slider.value = slider.getStyle("dataTipOffset");
            slider.snapInterval = 1;
            slider.tickInterval = 5;
            slider.liveDragging = true;
            slider.setStyle("dataTipPrecision", 0);
            slider.setStyle("showTrackHighlight", true);
            slider.addEventListener(SliderEvent.CHANGE, slider_change);

            lbl = new Label();
            lbl.width = 30;

            formItem = new FormItem();
            formItem.label = "dataTipOffset:";
            formItem.direction = FormItemDirection.HORIZONTAL;
            formItem.addChild(slider);
            formItem.addChild(lbl);
            addChild(formItem);
        }

        private function slider_change(evt:SliderEvent):void {
            slider.setStyle("dataTipOffset", evt.value);
            lbl.text = evt.value.toString();
        }
    }
}
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Slider_dataTipOffset_test_2/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/Slider_dataTipOffset_test_2/bin/main.html" width="100%" height="150"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the data tip offset in a Slider control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/09/setting-the-data-tip-offset-in-a-slider-control-in-flex/',contentID: 'post-625',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'dataTipOffset',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/05/09/setting-the-data-tip-offset-in-a-slider-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Customizing a slider control&#8217;s data tip</title>
		<link>http://blog.flexexamples.com/2007/11/03/customizing-a-slider-controls-data-tip/</link>
		<comments>http://blog.flexexamples.com/2007/11/03/customizing-a-slider-controls-data-tip/#comments</comments>
		<pubDate>Sat, 03 Nov 2007 07:47:06 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HSlider]]></category>
		<category><![CDATA[Slider]]></category>
		<category><![CDATA[VSlider]]></category>
		<category><![CDATA[dataTipOffset]]></category>
		<category><![CDATA[dataTipStyleName]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/03/customizing-a-slider-controls-data-tip/</guid>
		<description><![CDATA[<p>The following example shows how you can customize a slider control&#8217;s data tip in Flex. This example uses an embedded font and a data tip with a negative data tip offset that overlaps the slider thumb.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Slider_dataTipStyleName_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/11/03/customizing-a-slider-controls-data-tip/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can customize a slider control&#8217;s data tip in Flex. This example uses an embedded font and a data tip with a negative data tip offset that overlaps the slider thumb.</p>
<p>Full code after the jump.</p>
<p><span id="more-271"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Slider_dataTipStyleName_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/11/03/customizing-a-slider-controls-data-tip/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        @font-face{
            src: local("Arial");
            fontFamily: "ArialEmbedded";
            fontWeight: bold;
        }

        HSlider {
            dataTipOffset: -22;
            dataTipStyleName: "myDataTip";
        }

        .myDataTip {
            backgroundColor: black;
            color: white;
            fontWeight: bold;
            fontFamily: ArialEmbedded;
            fontSize: 16;
        }
    &lt;/mx:Style&gt;

    &lt;mx:HSlider id="slider" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Slider_dataTipStyleName_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/Slider_dataTipStyleName_test/bin/main.html" width="100%" height="100"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Customizing a slider control\&#039;s data tip on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/11/03/customizing-a-slider-controls-data-tip/',contentID: 'post-271',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'dataTipOffset,dataTipStyleName',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/11/03/customizing-a-slider-controls-data-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Styling the HSlider control using CSS</title>
		<link>http://blog.flexexamples.com/2007/09/12/styling-the-hslider-control-using-css/</link>
		<comments>http://blog.flexexamples.com/2007/09/12/styling-the-hslider-control-using-css/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 07:22:22 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HSlider]]></category>
		<category><![CDATA[Slider]]></category>
		<category><![CDATA[VSlider]]></category>
		<category><![CDATA[@font face]]></category>
		<category><![CDATA[dataTipOffset]]></category>
		<category><![CDATA[dataTipPlacement]]></category>
		<category><![CDATA[dataTipPrecision]]></category>
		<category><![CDATA[dataTipStyleName]]></category>
		<category><![CDATA[labelStyleName]]></category>
		<category><![CDATA[styleName]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/12/styling-the-hslider-control-using-css/</guid>
		<description><![CDATA[<p>The following example shows how you can style a HSlider (or VSlider) control in Flex using Cascading Style Sheets (CSS).</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HSlider_styleName_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/09/12/styling-the-hslider-control-using-css/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Style&#62; @font-face{ src: url("./fonts/arial.ttf"); fontFamily: "ArialEmbedded"; } .MyLabel { fontFamily: ArialEmbedded; fontSize: 15; fontWeight: [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can style a HSlider (or VSlider) control in Flex using Cascading Style Sheets (CSS).</p>
<p>Full code after the jump.</p>
<p><span id="more-171"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HSlider_styleName_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/09/12/styling-the-hslider-control-using-css/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        @font-face{
            src: url("./fonts/arial.ttf");
            fontFamily: "ArialEmbedded";
        }

        .MyLabel {
            fontFamily: ArialEmbedded;
            fontSize: 15;
            fontWeight: normal;
        }

        .MyDataTip {
            backgroundAlpha: 1.0;
            backgroundColor: haloBlue;
            color: white;
            cornerRadius: 10;
            fontWeight: bold;
            letterSpacing: 1;
        }

        .MySlider {
            dataTipOffset: 0;
            dataTipPrecision: 0;
            dataTipPlacement: left;
            dataTipStyleName: MyDataTip;
            showTrackHighlight: true;
            labelStyleName: MyLabel;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Array id="labelArr"&gt;
        &lt;mx:Number&gt;-10&lt;/mx:Number&gt;
        &lt;mx:Number&gt;0&lt;/mx:Number&gt;
        &lt;mx:Number&gt;10&lt;/mx:Number&gt;
        &lt;mx:Number&gt;20&lt;/mx:Number&gt;
    &lt;/mx:Array&gt;

    &lt;mx:HSlider id="slider"
            minimum="-10"
            maximum="20"
            labels="{labelArr}"
            snapInterval="1"
            tickInterval="10"
            styleName="MySlider" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HSlider_styleName_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/HSlider_styleName_test/bin/main.html" width="100%" height="150"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Styling the HSlider control using CSS on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/09/12/styling-the-hslider-control-using-css/',contentID: 'post-171',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: '@font face,dataTipOffset,dataTipPlacement,dataTipPrecision,dataTipStyleName,labelStyleName,styleName',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/09/12/styling-the-hslider-control-using-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

