home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / hypercar / 4759 < prev    next >
Encoding:
Text File  |  1993-01-11  |  3.4 KB  |  82 lines

  1. Newsgroups: comp.sys.mac.hypercard
  2. Path: sparky!uunet!gatech!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!pellns.alleg.edu!news
  3. From: dblackbu@alleg.edu (Dave Blackburn)
  4. Subject: Re: Progress ribbon in dialog box
  5. Message-ID: <1993Jan11.163724.10401@pellns.alleg.edu>
  6. Sender: news@pellns.alleg.edu
  7. Organization: Allegheny College
  8. References: <1993Jan8.062031.29404@murdoch.acc.Virginia.EDU>
  9. Date: Mon, 11 Jan 1993 16:37:24 GMT
  10. Lines: 70
  11.  
  12. In article <1993Jan8.062031.29404@murdoch.acc.Virginia.EDU>  
  13. mhz7c@curry.edschool.Virginia.EDU (Mark H. Zollinhofer) writes:
  14. edandavi@well.sf.ca.us  writes:
  15. > If you want to do a progress ribbon in HyperCard itself, you basically
  16. > need two parts, a passive rectangle which is paint or a button or a field,
  17. > and overlaying that, a hilited button which you resize to represent the
  18. > progress.  You'll change the rect of the indicator button each time you
  19. > update, keeping the left, top, and bottom coordinates, and adjusting the
  20. > right one.
  21. > the line at the core of the routine is:
  22. > set the rect of button <whatever> to myLeft,myTop,myRight,myBottom
  23. > Before that line you will have to fill those in, with only the right one
  24. > changing.
  25. > For a simple case ( a one hundred pixel progress bar, so as not to deal with
  26. > rounding from percents to pixels)
  27. > on updateProgress percentDone
  28. >   put the rect of btn "backButton" into buttonRect
  29. >   put item 1 of buttonRect + percentDone into item 3 of buttonRect
  30. >   set the rect of btn "indicator" to buttonRect
  31. > end updateProgress
  32. > There are also XCMDs that give you progress bar dialogs with or without
  33. > cancel buttons, etc.
  34. > Ed Allen
  35. > edandavi@well.sf.ca.us
  36. > BMUG HyperCard SIG Leader    Scripter for Hire
  37.  
  38. Thanks for the info.  I think that approach will work, but do
  39. you know how reactive it is , speedwise?  I'm interested in
  40. having the ribbon both increase and decrease in reaction to
  41. mouseClicks that the user is inputting in regard to movement on
  42. the screen of a button in random motion through scripting.  I
  43. hoped that an XCMD would be quicker, but I cant' find one
  44. currently.  I thought I'd seen one somewhere, but can't seem to
  45. locate in now when I need it.  Any suggestions for a source?
  46.  
  47. Thanks in advance.
  48. --
  49. |   Mark H. Zollinhofer          *****  Quotable quote:                 |
  50. |   619 Highland Ave.              |     "There's no need to take God   |
  51. |   Charlottesville, VA 22903      |      seriously." -Lot's wife       |
  52. |   internet: mhz7c@virginia.edu   |                  (Gen 19:26)       |
  53.  
  54. Two suggestions: 
  55. 1. Use the shareware XCMD "BarButton" to see the progress rectangle. You  
  56. define a button (which can be long and skinny) and then the parameters are  
  57. passed through BarButton() which hilites the appropriate fraction of its  
  58. length. You can probably find BarButton at your friendly neighborhood FTP  
  59. site. 
  60. 2. Apple's Compatibility Checker stack (distributed when System 7 came out)  
  61. has a similar feature that runs in color using an XCMD named "Thermometer". 
  62. It's probably not public though. 
  63.  
  64. So use BarButton, unless you Really Really need color. 
  65. --
  66.  
  67. * Dave Blackburn  dblackbu@alleg.edu  flames to self@home.dev.null *          
  68. * Chemistry, Macs, Hypercard, cats,  <>< religion, & the Dead      *
  69. * (Anyone else who held these opinions would be as crazy as I am.) *
  70. *   "Sometimes the songs that we hear are just songs of our own"   *
  71.