3 Replies Latest reply on Dec 5, 2007 5:24 AM by 807603

    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.