In this example you can see how we can use the tooltip with ViewStack container.
In this example you can see how we can use the tooltip with ViewStack container.In this example you can see how we can use the tooltip with ViewStack container. You will use ToolTips on child elements in a navigator container?s data provider. The component recognizes those ToolTips and displays them accordingly. In the following example, the ToolTips are propagated up to the ButtonBar.
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"> <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; mx|ToolTip{ font-family:Verdana; font-weight:bold; color:#FFFFFF; background-color:red; text-align:center; corner-radius:10; } </fx:Style> <s:Panel id="pnl" title="Tooltip with ViewStack Example" width="311" height="229" chromeColor="#555555" color="#FFFFFF" backgroundColor="#000000"> <s:VGroup x="17" y="14" height="167"> <mx:ButtonBar dataProvider="{vstack}"/> <mx:ViewStack id="vstack" borderStyle="solid" width="100%" height="140" backgroundColor="#9FA417"> <mx:Canvas id="label" label="Label" toolTip="Label Screen"> <s:Label text="Label" x="119" y="53" /> </mx:Canvas> <mx:Canvas id="button" label="Button" toolTip="Button Screen"> <s:Button label="Button" x="97" y="47"/> </mx:Canvas> <mx:Canvas id="textinput" label="TextInput" toolTip="TextInput Screen"> <s:TextInput text="TextInput" x="73" y="49" color="#000000"/> </mx:Canvas> <mx:Canvas id="textarea" label="TextArea" toolTip="TextArea Screen"> <s:TextArea text="TextArea" height="89" width="107" x="90" y="25" color="#000000"/> </mx:Canvas> </mx:ViewStack> </s:VGroup> </s:Panel> </s:Application> |
To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.