0 Replies Latest reply on Mar 6, 2008 2:57 PM by lian360

    Button's dynamic Tooltip get but on the edge of the container

      I have a button on the right side of the container, I modified a little of Livedoc's original sample code. The tooltip display only the original width of the initial text, once dynamic text comes in and longer than the original one, it will get cut. Do I have to specify something? I tried to set the width to the ToolTipManager.currentToolTip.width, but it doesn't seem to work.
      Here is the code to reproduce the problem:

      <?xml version="1.0"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" initialize="initApp()">
      import mx.managers.ToolTipManager;
      import mx.controls.ToolTip;
      import mx.events.ToolTipEvent;

      public function initApp():void {
      b1.addEventListener("toolTipShow", myToolTipChanger)
      public function myToolTipChanger(event:ToolTipEvent):void {
      ToolTipManager.currentToolTip.text = inputBox1.text;
      <mx:HBox width="100%" height="30" horizontalAlign="right">
      <mx:TextInput id="inputBox1"/>
      <mx:Button label="Hello" id="b1" toolTip="This is my initial ToolTip."/>

      When you type a long string in inputbox1, you will see the button tooltip gets cut.