There isn't. Currently, you can only set the contents of a text then measure its dimensions.

Can you file an improvement? It would be nice if you could request the width, height or both for efficiency...

Regards,
Max Carlson
OpenLaszlo.org

On 7/13/10 1:18 PM, P T Withington wrote:
Is there a public LFC API that will let you measure the dimensions of a line of 
text?

If you use a plain<text>  element, you can't try to read the size in the same 
call that sets the text, you have to listen for 'onwidth' (because most DOM's defer 
layout until javascript is idle).

I'm pretty sure the kernel has a way to measure text that uses some hackery to 
do it synchronously.  Can we expose that as a public API if it's not already?

Reply via email to