Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!rpi!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.hypercard Subject: Re: Making areas of field text clickable? Message-ID: <10266@hoptoad.uucp> Date: 16 Feb 90 00:06:39 GMT References: <3811@accuvax.nwu.edu> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 24 In article <3811@accuvax.nwu.edu> neves@aristotle.ils.nwu.edu (David Neves) writes: >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. No, you can use a trick I've used to good effect. On a click in a locked text field, unlock the field, and do two clicks yourself with the click command. This will select whatever word of text was clicked on, and you can use "the selection" and the related functions to figure things out. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "Strong men tremble when they hear it. They've got cause enough to fear it; It's even blacker than they smear it! No one mentions -- my name." - Bill Sykes, "Oliver"