1 Reply Latest reply on Aug 14, 2011 2:17 PM by Francisc

    getElementPreferredWidth() not working as expected

    Francisc Level 3

      Hello,

       

      I am extending the IconItemRenderer.

      In the layoutContents overridden method, calling getElementPreferredWidth(messageDisplay) will return the full width of the renderer minus paddings, iconWidth and decorator width.

       

      How can I get the "real" preferred value that I normally get from calling that?

      I could use messageDisplay.textWidth, but it seems like a hack or workaround rather than solution.

       

      Can I reset the calculations done in the super.layoutContents()?

       

      Thank you.