03
Sep
07

Globally disabling tool tips using the Flex ToolTipManager class

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.


0 Responses to “Globally disabling tool tips using the Flex ToolTipManager class”


  1. No Comments

Leave a Reply

This blog is terrible at eating HTML tags. If you plan on posting code/XML, please escape your "<" characters as "&lt;" and your ">" characters as "&gt;".