Determining exact location within a field

Dan Soneson sonesond1 at southernct.edu
Thu Feb 26 14:14:07 EST 2004


  I'm sorry, I did it again without the subject line. I will try to be 
more diligent.
Anyone have any suggestions on how to automatically include a subject 
line when responding from the digest version?

Dan

> Check into the selectedLoc function. This would allow you to (under
> lockScreen) select the chunk of text that is your placeholder, then use
> the selectedLoc() to determine where the topLeft corner of the 
> selection
> is, and then use that to draw your entry field.
>
> HTH,
>
> Ken Ray

Thanks, Ken. That's perfect! I simply use a unique initial character 
for each word and another unique end character. I then use the offset 
function to identify and select each character in turn, get the x,y 
coordinates, do a bit of recalculation and then create a field that 
begins at the initial  character and ends after the ending character. I 
don't even have to delete this word, just cover it with the new field. 
It works and looks terrific.

Thanks again.

Dan



More information about the use-livecode mailing list