0 Replies Latest reply on Oct 20, 2010 1:51 PM by eatabrain

    Custom ContextMenu doesn't work through a tooltip

    eatabrain

      I'm using FlexBuilder 3. In the following application, if you right-click anywhere in the white area, you get a menu containing the option "custom item." If you wait until a tooltip appears and right-click on the tooltip, the custom option does not appear, and "Print" appears in its place. Does anyone know how to fix this?

       

      ===================================
      <?xml version="1.0"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Canvas initialize="init()" toolTip="Here is my amazing tooltip!">
      <mx:Script> <![CDATA[
           import flash.ui.ContextMenu;
           import flash.ui.ContextMenuItem;
           private function init():void
           {
                contextMenu = new ContextMenu();
                contextMenu.hideBuiltInItems();
                contextMenu.customItems.push(new ContextMenuItem("custom item", true, true, true));
           }
      ]]> </mx:Script>
      <mx:HBox width="400" height="400" backgroundColor="white"></mx:HBox>
      </mx:Canvas>
      </mx:Application>
      ===================================