Home Tutorial Flex Flex4 Components ToolTip style using styleManager in Flex4

 
 

Share on Google+Share on Google+
ToolTip style using styleManager in Flex4
Posted on: July 13, 2010 at 12:00 AM
Advertisement
In this example you can see how we can change the style of ToolTip.

ToolTip style using styleManager in Flex4:

In this example you can see how we can change the style of ToolTip. In this example we use a styleManager for change the style of ToolTip.

Example:

<?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"

creationComplete="tooltipStylemanager()">

<fx:Script>

<![CDATA[

private function tooltipStylemanager():void{

styleManager.getStyleDeclaration

("mx.controls.ToolTip").setStyle("textAlign","center");

styleManager.getStyleDeclaration

("mx.controls.ToolTip").setStyle("fontWeight","bold");

styleManager.getStyleDeclaration

("mx.controls.ToolTip").setStyle("fontFamily","Verdana");

styleManager.getStyleDeclaration

("mx.controls.ToolTip").setStyle("color","#FFFFFF");

styleManager.getStyleDeclaration

("mx.controls.ToolTip").setStyle("backgroundColor","#000000");

}

]]>

</fx:Script>

<s:Panel title="ToolTip Style using styleManager Example"

chromeColor="#555555/font>"

color="#CCCCCC"

width="253"

height="177">

<mx:ApplicationControlBar

horizontalAlign="center"

width="251">

<s:Label text="Take mouse on Button"

color="#000000"

fontFamily="Verdana"/>

</mx:ApplicationControlBar>

<s:Button id="button"

label="Tooltip"

toolTip="This is a Button &#13;and&#13; it's a ToolTip example"

x="17" y="44"/>

</s:Panel>

&</s:Application>

Output:

Running Application:

To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.

Download this code

Advertisement

Related Tags for ToolTip style using styleManager in Flex4:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 13, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com