The formatted mouseline?
Dave Cragg
dcragg at lacscentre.co.uk
Thu Jan 12 12:20:10 EST 2006
On 12 Jan 2006, at 16:16, Mark Swindell wrote:
> I'm looking for the location of the formatted line, or its
> coordinates relative the field, so that I can place a graphic (an
> underline or somesuch) under the text of that formatted line. This
> has to be derived from the mouse position relative to the formatted
> line position as this graphic will move based on where the mouse is.
Not perfect, but something like this in the field script (graphic 1
is the graphic to be moved):
on mouseMove
put the mouseChunk into tMC
if tMC <> empty then
get the formattedRect of tMC
set the top of graphic 1 to item 4 of it
end if
end mouseMove
I'm assuming the graphic width would be set to the width of the field.
One limitation is that when the mouse moves over empty space at the
end of a line, the mouseChunk returns empty. I can't think of a way
round that.
Cheers
Dave
More information about the use-livecode
mailing list