View Full Version : TextMetrics

2 Feb 2012, 8:46 PM

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?

3 Feb 2012, 6:24 AM
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.