Globally disabling tool tips using the Flex ToolTipManager class

by Peter deHaan on September 3, 2007

in ToolTip

The following example shows how you can enable and disable tool tips globally within a Flex application by setting the ToolTipManager.enabled property.

Full code after the jump.

View MXML

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/09/03/globally-disabling-tool-tips-using-the-flex-tooltipmanager-class/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

    <mx:Script>
        <![CDATA[
            import mx.managers.ToolTipManager;

            private function toggleToolTipEnabled():void {
                ToolTipManager.enabled = !ToolTipManager.enabled;
            }
        ]]>
    </mx:Script>

    <mx:ApplicationControlBar dock="true">
        <mx:CheckBox label="ToolTipManager.enabled"
                selected="true"
                click="toggleToolTipEnabled()" />
    </mx:ApplicationControlBar>

    <mx:Button id="button"
            label="Roll over me for a tool tip"
            toolTip="The quick brown fox jumped over the lazy dog" />

</mx:Application>

View source is enabled in the following example.

{ 1 comment… read it below or add one }

1 Kris January 5, 2009 at 11:32 am

Took forever for me to search the internet to disable tooltips, and now I see its emberassingly simple. :-)
Thank you for posting.

Reply

Leave a Comment

Sorry, this blog is terrible at eating HTML comments.
If you're pasting any HTML/XML/MXML code, you need to convert your < characters to &lt; and your > characters to &gt; .

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Anti-Spam Protection by WP-SpamFree

Previous post:

Next post: