1 Reply Latest reply on Apr 23, 2008 1:57 PM by Sergey Smirnov

    Get width of a component dynamically

    Marcelo Leiras Newbie


      i wanna know the width of a HtmlOutputText dinamically, before it be rendered, like this:

      HtmlPanel pnBack = new HtmlPanel();
      HtmlOutputText ot = new HtmlOutputText();
      ot.setValue("Some Text Here");
      int width = ot.getWidth();

      Of course the method getWidth() does not exist for the component HtmlOutputText.
      Any suggestions? Thanks.