Location of a specific word

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Location of a specific word

Post by andyh1234 » Tue Mar 03, 2009 8:03 pm

Is it possible to find out the x,y location of a specific word in a field?

Id need to place a 'target' style graphic over specific words, I can already highlight them, but I need to find their position so i can

set the loc of graphic "target" to......

Ive tried to the loc of word x of line y of field "myfield" but that didnt work, any other ideas?

Thanks

Andy

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Mar 03, 2009 8:27 pm

Hi Andy,

You can select the word and get the selectedLoc. I believe that the returned co-ordinate is the topleft of the word.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Post by andyh1234 » Tue Mar 03, 2009 10:52 pm

Thanks Mark

Post Reply