Measuring text width

Asked by Kim Gressens

Are there any calls avaiable in jeash to get the width of a giving string when rendered ? I've been searching for a couple of hours and haven't been able to find any.

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
jeash Edit question
Assignee:
No assignee Edit question
Solved by:
Kim Gressens
Solved:
Last query:
Last reply:
Revision history for this message
Niel Drummond (niel-drummond) said :
#1

I think TextFieldInst.textWidth should give you the right size.

Otherwise there are internal methods that are more accurate, but I don't recommend you use them, because they tend to change a lot.

An implementation for TextLineMetrics is desirable, but I don't really have the time to do it at the moment.

- Niel

Revision history for this message
Kim Gressens (kim-gressens) said :
#2

Thanks for the info Niel, saves me a couple of hours :-)