<?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; scrollTipFunction</title>
	<atom:link href="http://blog.flexexamples.com/tag/scrolltipfunction/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>Formatting scroll tips on a ComboBox control in Flex</title>
		<link>http://blog.flexexamples.com/2008/07/01/formatting-scroll-tips-on-a-combobox-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/07/01/formatting-scroll-tips-on-a-combobox-control-in-flex/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 06:56:54 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[ComboBox]]></category>
		<category><![CDATA[dropdown]]></category>
		<category><![CDATA[scrollTipFunction]]></category>
		<category><![CDATA[showScrollTips]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/07/01/formatting-scroll-tips-on-a-combobox-control-in-flex/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/07/01/displaying-scroll-tips-on-a-combobox-control-in-flex/">&#8220;Displaying scroll tips on a ComboBox control in Flex&#8221;</a>, we saw you can toggle scroll tips on a Flex ComboBox control&#8217;s dropdown menu by setting the showScrollTips and dropdown properties.</p> <p>The following example shows you how you can format the scroll tip on a Flex ComboBox control by setting the [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/07/01/displaying-scroll-tips-on-a-combobox-control-in-flex/">&#8220;Displaying scroll tips on a ComboBox control in Flex&#8221;</a>, we saw you can toggle scroll tips on a Flex ComboBox control&#8217;s dropdown menu by setting the <code>showScrollTips</code> and <code>dropdown</code> properties.</p>
<p>The following example shows you how you can format the scroll tip on a Flex ComboBox control by setting the <code>scrollTipFunction</code> property on the ComboBox control&#8217;s <code>dropdown</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-692"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/ComboBox_dropdown_scrollTipFunction_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/07/01/formatting-scroll-tips-on-a-combobox-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="top"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.DropdownEvent;

            private function comboBox_open(evt:DropdownEvent):void {
                comboBox.dropdown.showScrollTips = checkBox.selected;
                comboBox.dropdown.scrollTipFunction = comboBox_dropdown_scrollTipFunc;
            }

            private function comboBox_dropdown_scrollTipFunc(dir:String, pos:uint):String {
                return pos + " of " + comboBox.dropdown.maxVerticalScrollPosition;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="One" /&gt;
        &lt;mx:Object label="Two" /&gt;
        &lt;mx:Object label="Three" /&gt;
        &lt;mx:Object label="Four" /&gt;
        &lt;mx:Object label="Five" /&gt;
        &lt;mx:Object label="Six" /&gt;
        &lt;mx:Object label="Seven" /&gt;
        &lt;mx:Object label="Eight" /&gt;
        &lt;mx:Object label="Nine" /&gt;
        &lt;mx:Object label="Ten" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="showScrollTips:"&gt;
                &lt;mx:CheckBox id="checkBox"
                        selected="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:ComboBox id="comboBox"
            dataProvider="{arr}"
            open="comboBox_open(event);" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/ComboBox_dropdown_scrollTipFunction_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/ComboBox_dropdown_scrollTipFunction_test/bin/main.html" width="100%" height="200"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Formatting scroll tips on a ComboBox control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/07/01/formatting-scroll-tips-on-a-combobox-control-in-flex/',contentID: 'post-692',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'dropdown,scrollTipFunction,showScrollTips',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/07/01/formatting-scroll-tips-on-a-combobox-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Displaying scroll tips in a List control in Flex</title>
		<link>http://blog.flexexamples.com/2008/03/28/displaying-scroll-tips-in-a-list-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/03/28/displaying-scroll-tips-in-a-list-control-in-flex/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 02:42:26 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[List]]></category>
		<category><![CDATA[scrollTipFunction]]></category>
		<category><![CDATA[showScrollTips]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/28/displaying-scroll-tips-in-a-list-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can display scroll tips in a Flex List control by setting the showScrollTips property. You can also customize the scroll tip text by setting a custom scroll tip function using the scrollTipFunction property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_showScrollTips_test/bin/srcview/index.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/03/28/displaying-scroll-tips-in-a-list-control-in-flex/ --&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can display scroll tips in a Flex List control by setting the <code>showScrollTips</code> property. You can also customize the scroll tip text by setting a custom scroll tip function using the <code>scrollTipFunction</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-576"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_showScrollTips_test/bin/srcview/index.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/03/28/displaying-scroll-tips-in-a-list-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[
            import mx.controls.scrollClasses.ScrollBarDirection;
            import mx.utils.StringUtil;

            private function list_scrollTipFunc(dir:String, pos:Number):String {
                var pct:Number = pos / list.maxVerticalScrollPosition;
                return StringUtil.substitute("{0} / {1} ({2}%)",
                        pos, // current
                        list.maxVerticalScrollPosition, // max
                        numberFormatter.format(pct * 100) // percent
                    );
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:NumberFormatter id="numberFormatter" precision="0" /&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="Accordion" /&gt;
        &lt;mx:Object label="ApplicationControlBar" /&gt;
        &lt;mx:Object label="Box" /&gt;
        &lt;mx:Object label="Canvas" /&gt;
        &lt;mx:Object label="ControlBar" /&gt;
        &lt;mx:Object label="DividedBox" /&gt;
        &lt;mx:Object label="Form" /&gt;
        &lt;mx:Object label="FormHeading" /&gt;
        &lt;mx:Object label="FormItem" /&gt;
        &lt;mx:Object label="Grid" /&gt;
        &lt;mx:Object label="HBox" /&gt;
        &lt;mx:Object label="HDividedBox" /&gt;
        &lt;mx:Object label="Panel" /&gt;
        &lt;mx:Object label="TabNavigator" /&gt;
        &lt;mx:Object label="Tile" /&gt;
        &lt;mx:Object label="TitleWindow" /&gt;
        &lt;mx:Object label="VBox" /&gt;
        &lt;mx:Object label="VDividedBox" /&gt;
        &lt;mx:Object label="ViewStack" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:CheckBox id="checkBox"
                label="showScrollTips:"
                labelPlacement="left"
                selected="true" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id="list"
            dataProvider="{arr}"
            rowCount="6"
            showScrollTips="{checkBox.selected}"
            scrollTipFunction="list_scrollTipFunc"
            verticalScrollPolicy="on" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/List_showScrollTips_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/List_showScrollTips_test/bin/main.html" width="100%" height="250"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Displaying scroll tips in a List control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/03/28/displaying-scroll-tips-in-a-list-control-in-flex/',contentID: 'post-576',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'scrollTipFunction,showScrollTips',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/03/28/displaying-scroll-tips-in-a-list-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Creating a custom scroll tip function on a Flex TextArea control</title>
		<link>http://blog.flexexamples.com/2007/11/21/creating-a-custom-scroll-tip-function-on-a-flex-textarea-control/</link>
		<comments>http://blog.flexexamples.com/2007/11/21/creating-a-custom-scroll-tip-function-on-a-flex-textarea-control/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 06:23:41 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TextArea]]></category>
		<category><![CDATA[scrollTipFunction]]></category>
		<category><![CDATA[showScrollTips]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/21/creating-a-custom-scroll-tip-function-on-a-flex-textarea-control/</guid>
		<description><![CDATA[<p>The following example shows how you can create a custom scroll tip function for a TextArea control in Flex.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextArea_scrollTipFunction_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/11/21/creating-a-custom-scroll-tip-function-on-a-flex-textarea-control/ --&#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 textArea_scrollTipFunc(direction:String, position:Number):String { var str:String; switch (direction) { case "horizontal": str [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can create a custom scroll tip function for a TextArea control in Flex.</p>
<p>Full code after the jump.</p>
<p><span id="more-318"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TextArea_scrollTipFunction_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/21/creating-a-custom-scroll-tip-function-on-a-flex-textarea-control/ --&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 textArea_scrollTipFunc(direction:String, position:Number):String {
                var str:String;
                switch (direction) {
                    case "horizontal":
                        str = position + "/" + textArea.maxHorizontalScrollPosition;
                        break;
                    case "vertical":
                        str = position + "/" + textArea.maxVerticalScrollPosition;
                        break;
                }
                return str;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:String id="lorem" source="lorem.txt" /&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="showScrollTips:"&gt;
                &lt;mx:CheckBox id="checkBox" selected="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TextArea id="textArea"
            text="{lorem}" wordWrap="false"
            showScrollTips="{checkBox.selected}"
            scrollTipFunction="textArea_scrollTipFunc"
            width="100%"
            height="100%" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TextArea_scrollTipFunction_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/TextArea_scrollTipFunction_test/bin/main.html" width="100%" height="250"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Creating a custom scroll tip function on a Flex TextArea control on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/11/21/creating-a-custom-scroll-tip-function-on-a-flex-textarea-control/',contentID: 'post-318',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'scrollTipFunction,showScrollTips',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/21/creating-a-custom-scroll-tip-function-on-a-flex-textarea-control/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

