Centering an object in a window

Barry Levine themacguy at macosx.com
Mon Aug 11 20:48:01 EDT 2003


I'm not sure if this is the proper method but it worked so I thought 
I'd post it.

on centerTheObject
   global theObject
   set the loc of theObject to (item 1 of the localloc of the loc of 
this stack) ,\
	(item 2 of the localloc of the loc of this stack)
end centerTheObject

In the script that calls the above, I use:

put myObject into theObject
-- "myObject" for example being "field m144" (using quotes)

Hope this helps someone.

Regards,
Barry




More information about the use-livecode mailing list