home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / hypercar / 4927 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  2.0 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!garnet.berkeley.edu!jstern
  2. From: jstern@garnet.berkeley.edu ()
  3. Newsgroups: comp.sys.mac.hypercard
  4. Subject: Re: Multi-part field OR selecting multiple fields
  5. Date: 25 Jan 1993 19:58:20 GMT
  6. Organization: University of California, Berkeley
  7. Lines: 48
  8. Message-ID: <1k1gos$9gl@agate.berkeley.edu>
  9. References: <1993Jan24.004224.4137@netcom.com>
  10. NNTP-Posting-Host: garnet.berkeley.edu
  11.  
  12. In article <1993Jan24.004224.4137@netcom.com> ptrubey@netcom.com (Phil Trubey) writes:
  13. >
  14. >So ... does anyone know of a PD or commercial XCMD that implements
  15. >a table view.  I envision this XCMD doing one of two things:
  16. >
  17. >- implement a field that allows multiple items of data to be placed in
  18. >  a line such that each item starts at some tab boundary.
  19. >
  20. >OR
  21. >
  22. >- implement a field type that allows more than one field line to be
  23. >  selected at the same time.
  24. >
  25. >Thanks for any info or pointers.
  26. >-- 
  27. >
  28. If you find anything that does this, please post it. 
  29. In the meantime, the way I've done this is to create a transparent
  30. button that covers the width of all (3) fields, and is the height
  31. of a single line. When you want to hilite a "row", you simply set
  32. the topleft, or, rect, or loc of the button so that it's in the
  33. right place, and set its hilite to true. 
  34.  
  35. Here's sample code:
  36.  
  37. on mouseup
  38.   global currentRow
  39.   put word 2 of the clickline into currentRow
  40.   put (currentRow * the textheight of me) + B
  41.   item 2 of the rect of me - 10 into theVloc
  42.   put item 1 of the rect of me into theHloc
  43.   set the loc of bg btn hiliteRow to theHloc,theVloc  
  44.   set the hilite of bg btn hiliteRow to true
  45. end mouseup
  46.  
  47. You'd then want to add code that would deal with the cutting,copying,
  48. and pasting (i.e. trapping cut and copy so that it puts all 3 pieces
  49. into a global, and paste so that it uses what's in the global, rather
  50. than what's on the clipboard, and puts stuff in the right place.)
  51.  
  52. hope this helps.
  53.  
  54. Judy Stern
  55. Instructional Technology Program
  56. UC Berkeley
  57. jstern@garnet.berkeley.edu
  58.  
  59.  
  60.