3 Replies Latest reply on Jan 10, 2012 1:01 PM by bdupuis hibernum

    ☞ Flex 4 ToolTipCreate : Not showing without toolTip property, and not Positioning

    Yozef0 Level 1

      I have a Button:

      <s:Button xmlns:fx="http://ns.adobe.com/mxml/2009" 
                 xmlns:s="library://ns.adobe.com/flex/spark" 
                 xmlns:mx="library://ns.adobe.com/flex/mx"
                 skinClass="components.Marker"
                  click="doSomething(event)"
                  buttonMode="true"
                  toolTipCreate="toolTipCreateHandler(event)"
                  toolTip="{_idx}">
      
      

       

      That triggers the following ToolTipCreate method:

      protected function toolTipCreateHandler(event:ToolTipEvent):void {
           var ticketToolTip:TicketToolTip = new TicketToolTip(); // A Group class that Implements IToolTip
            ticketToolTip.TicketIdxLbl.text = _idx.toString();
            ticketToolTip.x = this.x + this.width + 2;
            ticketToolTip.y = this.y;
            event.toolTip = ticketToolTip;
      }
      

       

       

      The thing is... Without the toolTip={_idx}, the Button shows No ToolTip all together (makes me wonder, why have the toolTipCreate?)

      The Main Problem I am facing though is the position of the ToolTip itself... the following does nothing:

       

      ticketToolTip.x = this.x + this.width + 2;
      ticketToolTip.y = this.y;
      

       

      Anybody had a similar obstacle?