Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!uwm.edu!mailrus!accuvax.nwu.edu!aristotle.ils.nwu.edu!neves From: neves@aristotle.ils.nwu.edu (David Neves) Newsgroups: comp.sys.mac.hypercard Subject: Making areas of field text clickable? Message-ID: <3811@accuvax.nwu.edu> Date: 13 Feb 90 20:48:03 GMT Sender: news@accuvax.nwu.edu Reply-To: neves@aristotle.ils.nwu.edu (David Neves) Organization: The Institute for the Learning Sciences, Northwestern University Lines: 34 Here is my problem. I have many field texts. I want to make most of the text in these fields sensitive to clicks. The 2 ways of doing this are: 1. Have the field (on mousedown or mouseup) figure out what text the user has clicked on. This gets messy because the only RETURNs in the fields are between paragraphs and the font is variable width. To do this one would have to write an XCMD that used the character width information and a good guess as to the word wrap routine that Hypercard (in my case, Supercard) was using. 2. Put buttons over all the text. I don't want to do this by hand because I might change the field width or the text font. Both of these would affect the positioning of words and so the buttons would not longer be under the correct words. It is not trival to get a program to do this automatically. The only way that I could think of doing this is to start at the left part of the field and gradually (pixel by pixel) select larger chunks of text by using DRAG or CLICK. Because the program is doing the dragging you know the left and right pixel positions of the selected text underneath. Before we write this sad kludge I wonder if anyone else has run into problem or see an obviously easier way of doing it. p.s. For those using Supercard there is a nasty bug in SEND. You can only SEND to cards that are being displayed in a window, not to cards that are not at the front. neves@ils.nwu.edu Institute for the Learning Sciences, 1890 Maple, Evanston Il 60201