Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!baum From: baum@Apple.COM (Allen J. Baum) Newsgroups: comp.sys.mac.hypercard Subject: Re: using fields with scroll bars Message-ID: <32570@apple.Apple.COM> Date: 21 Jun 89 17:33:17 GMT References: <4161@emory.mathcs.emory.edu> Reply-To: baum@apple.UUCP (Allen Baum) Organization: Apple Computer, Inc. Lines: 27 [] >In article <4161@emory.mathcs.emory.edu> riddle@mathcs.emory.edu (Larry Riddle) writes: >I need some help with the following problem: ...basically, highlighting a line of a scrolling field >Any suggestions? I had exactly the same problem. I'm assuming you don't want more than one line highlighted at once. I set the locktext of the scrolling field to true, so that mouseclicks on the field send mouseup/down to the script of the field. The script is: on mouseup set lockText of me to false --stop intercepted mouseclicks click at clickloc --put text cursor in field select the selectedline --use 'selectedline' function to select line set lockText of me true --start intercepting mouseclicks again --put your action here, i.e. set visible of field (word 2 of the selectedline) to true end mouseup You can determine the number of the line that you selected by looking at word 2 of the selectedline Note that if a line wraps, both 'physical' lines will be selected. This is fairly slow, unfortunately. I'm not sure what is taking so long, but it may be just a bit too slow for real interactive work. -- baum@apple.com (408)974-3385 {decwrl,hplabs}!amdahl!apple!baum