home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.hypercard
- Path: sparky!uunet!well!well.sf.ca.us!edandavi
- From: edandavi@well.sf.ca.us (Ed Allen and Avi Rappoport)
- Subject: Re: Progress ribbon in dialog box
- Message-ID: <edandavi.725335110@well.sf.ca.us>
- Sender: news@well.sf.ca.us
- Organization: Whole Earth 'Lectronic Link
- References: <1992Dec22.150429.5190@murdoch.acc.Virginia.EDU>
- Date: Sat, 26 Dec 1992 01:58:30 GMT
- Lines: 33
-
-
- 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
-