Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!t-jacobs From: t-jacobs@wasatch.utah.edu (Tony Jacobs) Newsgroups: comp.sys.mac.hypercard Subject: Re: MacWeek dragRECT XCFN Message-ID: <1638@wasatch.utah.edu> Date: 22 Apr 89 17:44:15 GMT References: <12291@ut-emx.UUCP> Organization: University of Utah, College of Engineering Lines: 39 In article <12291@ut-emx.UUCP> ben@ut-emx.UUCP (Benjamin J. Sloan) writes: >This week's (ending April 20) edition of MacWeek magazine makes mention of an >XCFN called 'dragRECT' for use in making scroll bars in HyperCard. Does >anyone know of such an XFCN and/or how one might obtain it? > >Thanks in advance, > >Ben Sloan >Univ. Texas Geology >ben@emx.utexas.edu It's not the one mentioned in MacWeek but I wrote one that works. It takes a rectangle passed inside a mouse down handler and you drag a grey outline of the rectangle around where you please. I am still planning on adding some error checking and passing a message back to indicate if a valid rectangle is passed in. If some one has a LSC piece of code for passing back a result it would help. I have tried a couple of different ones and haven't got them to work. I haven't tried real hard to debug them yet. It currently handles a shift key or shift-option to force it into a verticle or horizontal movement. In order to do a scroll bar correctly I would need to add a switch which I'm thinking of doing. I'm also thinking of adding a switch that would pass a message back to move the "target" (whether it be a button or field) by the amount the rectangle is passed. I would also like to be able to add the ability to interact with HyperCard so that if the mouse is above a button or field it can hilite it. This way you can use buttons or fields as objects and you can move them to other objects and "put them in" those objects. Things like that. If anyone has other suggestions for enhancements to my "DragIT" XCMD, let me know and I'll see what I can do. If you want the abbreviated version of it, mail me and I'll send it to you. It is free with all rights reserved, free to use in non commercial stacks, etc. -- Tony Jacobs * Center for Engineering Design * U of U * t-jacobs@ced.utah.edu