reposition single-line text to the left or right?

J. Landman Gay jacque at hyperactivesw.com
Wed Apr 25 20:32:04 EDT 2012


On 4/25/12 6:31 PM, Nicolas Cueto wrote:
> A Son of Thunder asked:
>
>> … is there a reason you don't want to use the hScroll?
>
> Laziness. My app is for Android, and being still new to that platform,
> I avoid as much as possible scrollable objects (even with the help of
> MobGUI).

I did something like this once:

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

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com





More information about the use-livecode mailing list