Results 1 to 2 of 2

Thread: TextMetrics

  1. #1
    Sencha User
    Join Date
    May 2010
    Location
    Las Vegas, NV
    Posts
    134
    Answers
    7

    Default TextMetrics

    Hello,

    I am using Ext.util.TextMetrics to calculate the exact pixel width/height of some text in a TextArea. This works fine for the default CSS. But it does not give the right values when I use my own CSS overrides.

    Does anyone else experience this?

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    What happens is the text is actually rendered off screen to be calculated so if you have the text wrapped in a <div> or something to apply custom styling, you will need to pass that with the text.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •