Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!ll-xn!mit-eddie!uw-beaver!cornell!rochester!ritcv!cci632!ccicpg!felix!john From: john@felix.UUCP (John Gilbert) Newsgroups: comp.sys.mac.hypercard Subject: Re: Buttons in Scrolling Fields Message-ID: <27407@felix.UUCP> Date: 30 Mar 88 21:27:07 GMT References: <46287@sun.uucp> <31927@gt-cmmsr.GATECH.EDU> <7494@apple.UUCP> Sender: daemon@felix.UUCP Reply-To: john@felix.UUCP (John Gilbert) Organization: FileNet Corp., Costa Mesa, CA Lines: 29 In article <7494@apple.UUCP> baum@apple.UUCP (Allen Baum) writes: >>In article <31927@gt-cmmsr.GATECH.EDU> nerb@gt-cmmsr.UUCP (Brennan Robison) writes: >>Is there any way to insert the button INTO the scrolling field? > >The way I did something like this is to lock the field. When you click >on the field, a mousedown/up script can be run that uses the clickloc, >the field's rect, and the field's scroll to calculate the line in the field. >Alternatively, you can unlock the field, click on the leftedge,yloc and >shiftclick on rightedge,yloc to select the entire line, and then use the >selection to do further processing (don't forget to relock the field). There has been quite a discussion about this, and some time back someone posted a script reported to do this, which I don't have. It seems to me it is a bit more complicated than what is mentioned above because the number of lines in the field does not necessarily correspond to the number of displayed lines if lines auto-wrap (no 'return' at the end of the display line). You would actually need to compute the width of a line relative to the width of the field and count the number of display lines the field line occupies. Is this right? This is the part I am uncertain of how to do. Could someone E-Mail me the previously posted script if it does this. Thanks, John G. -- John Gilbert !trwrb!felix!john