reposition single-line text to the left or right?

Nicolas Cueto niconiko at gmail.com
Wed Apr 25 22:29:01 EDT 2012


> on rawKeyUp pKey
>  -- check for eligible field here if you need to, then:
>  if the formattedHeight of fld x > the width of fld x then
>    set the textalign of fld x to "right"
>  else
>    set the textalign of fld x to "left"
>  end if
> end rawKeyUp
>

Elegant and simple solution. (But changed "formattedHeight" to
"formattedWidth").

Thank you, Jacque!

--
Nicolas Cueto




More information about the use-livecode mailing list