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

    Get width of a component dynamically

    Marcelo Leiras Newbie

      Hi,

      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");
      
      pnBack.getChildren().add(ot);
      
      int width = ot.getWidth();
      


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