Use MouseLine() and still edit the same field?

Mark Mitchell cowhead at mac.com
Fri Mar 4 15:08:45 EST 2016


(Sorry Heather!  I’m sending this message again from the ‘proper’ account..)

I’m not sure how long it has been around, but I have just discovered the ‘mousewhithin’ message combined with the mouseline() function… Awesome!  So, for those of you who don’t know, the ‘mousewithin’ message is sent to a field periodically (5 times a second?) whenever the mouse is inside that field. 

Then, the mouseline function returns whatever line of that field the mouse is currently hovering over.  I am currently using this to warn folks if they have too many characters per line.  And that works fine.

But to make it more intuitive, I want to somehow hilite or indicate the line that the mouse is over in the field, without disturbing the ability to edit that field (copy, paste, type stuff) with ease.  

I have tried a few different ways of hiliting the line of the field (selecting it, changing the color of the text of it, etc) but any sort of repeat or recursive structure does not work, as the “mousewithin” message is simply sent far too often for any ‘repeat’ or recursion to work.

Does anyone have any other ideas for highlighting a line in a field that might work under these conditions?

Thanks!

Markk





More information about the use-livecode mailing list