3 Replies Latest reply: Dec 4, 2007 11:24 PM by 807603 RSS

    how to fit string with in the label


      Given a string say "Click here to preview" and size of a label in pixels say 120px. How can I fit the label with in the given label width.

      Actually reading strings from properties files and have to fit strings of varring length in a label of given fixed size(by either changing the font or font size etc).
      Label size is also fixed.
      My problem is how can I detect that applying a font,size to a string will fit the string with in the label of given size.

      with regards.