0 Replies Latest reply on Jul 16, 2006 7:35 PM by djsodom

    Difficult Sizing of a Custom Tool Tip

    djsodom
      I've got a text field that I truncate if it is over 40px in height. I then display a custom tool tip that displays the entire text.

      There is no problem creating the tool tip:

      private function createToolTip(myTip:String):void {
      myTip = ToolTipManager.createToolTip(myTip, 4,4);
      myTip.width = 270;
      }

      The problem comes in if I try to increase the font-size to something larger, like so...

      private function createToolTip(myTip:String):void {
      myTip = ToolTipManager.createToolTip(myTip, 4,4);
      myTip.width = 270;
      myTip.setStyle("fontSize","14");
      }

      by increasing the font size, the background is sometimes too short for all the text. How can I make sure it can grow to the length of the text?

      I've tried setting the maxHeight to something large enough, but that doesn't help.

      Thanks,

      Steve