home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.hypercard
- 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
- From: dblackbu@alleg.edu (Dave Blackburn)
- Subject: Re: Progress ribbon in dialog box
- Message-ID: <1993Jan11.163724.10401@pellns.alleg.edu>
- Sender: news@pellns.alleg.edu
- Organization: Allegheny College
- References: <1993Jan8.062031.29404@murdoch.acc.Virginia.EDU>
- Date: Mon, 11 Jan 1993 16:37:24 GMT
- Lines: 70
-
- In article <1993Jan8.062031.29404@murdoch.acc.Virginia.EDU>
- mhz7c@curry.edschool.Virginia.EDU (Mark H. Zollinhofer) writes:
- edandavi@well.sf.ca.us writes:
- >
- > If you want to do a progress ribbon in HyperCard itself, you basically
- > need two parts, a passive rectangle which is paint or a button or a field,
- > and overlaying that, a hilited button which you resize to represent the
- > progress. You'll change the rect of the indicator button each time you
- > update, keeping the left, top, and bottom coordinates, and adjusting the
- > right one.
- >
- > the line at the core of the routine is:
- >
- > set the rect of button <whatever> to myLeft,myTop,myRight,myBottom
- >
- > Before that line you will have to fill those in, with only the right one
- > changing.
- >
- > For a simple case ( a one hundred pixel progress bar, so as not to deal with
- > rounding from percents to pixels)
- >
- > on updateProgress percentDone
- > put the rect of btn "backButton" into buttonRect
- > put item 1 of buttonRect + percentDone into item 3 of buttonRect
- > set the rect of btn "indicator" to buttonRect
- > end updateProgress
- >
- >
- >
- > There are also XCMDs that give you progress bar dialogs with or without
- > cancel buttons, etc.
- >
- >
- > Ed Allen
- > edandavi@well.sf.ca.us
- > BMUG HyperCard SIG Leader Scripter for Hire
-
- Thanks for the info. I think that approach will work, but do
- you know how reactive it is , speedwise? I'm interested in
- having the ribbon both increase and decrease in reaction to
- mouseClicks that the user is inputting in regard to movement on
- the screen of a button in random motion through scripting. I
- hoped that an XCMD would be quicker, but I cant' find one
- currently. I thought I'd seen one somewhere, but can't seem to
- locate in now when I need it. Any suggestions for a source?
-
- Thanks in advance.
- --
- | Mark H. Zollinhofer ***** Quotable quote: |
- | 619 Highland Ave. | "There's no need to take God |
- | Charlottesville, VA 22903 | seriously." -Lot's wife |
- | internet: mhz7c@virginia.edu | (Gen 19:26) |
-
- Two suggestions:
- 1. Use the shareware XCMD "BarButton" to see the progress rectangle. You
- define a button (which can be long and skinny) and then the parameters are
- passed through BarButton() which hilites the appropriate fraction of its
- length. You can probably find BarButton at your friendly neighborhood FTP
- site.
- 2. Apple's Compatibility Checker stack (distributed when System 7 came out)
- has a similar feature that runs in color using an XCMD named "Thermometer".
- It's probably not public though.
-
- So use BarButton, unless you Really Really need color.
- --
-
- * Dave Blackburn dblackbu@alleg.edu flames to self@home.dev.null *
- * Chemistry, Macs, Hypercard, cats, <>< religion, & the Dead *
- * (Anyone else who held these opinions would be as crazy as I am.) *
- * "Sometimes the songs that we hear are just songs of our own" *
-