home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!munnari.oz.au!uniwa!cujo!ncrpda.curtin.edu.au!rocky.curtin.edu.au!user
- From: peter@cujo.curtin.edu.au (Peter N Lewis)
- Subject: Re: Alert Help
- Message-ID: <peter-130193093811@rocky.curtin.edu.au>
- Followup-To: comp.sys.mac.programmer
- Lines: 46
- Sender: news@ncrpda.curtin.edu.au
- Nntp-Posting-Host: ncrpda.curtin.edu.au
- Organization: NCRPDA, Curtin University
- References: <1993Jan12.001107.329@physc1.byu.edu> <1993Jan12.002334.330@physc1.byu.edu>
- Date: Wed, 13 Jan 1993 01:42:37 GMT
-
- In article <1993Jan12.002334.330@physc1.byu.edu>, seth@physc1.byu.edu
- wrote:
- >
- > DANG IT! Not more than two minutes after I posted my question I went back and
- > started looking at my alert again and noticed that the static text that was
- > getting the rectangle around it was item #1. So, I tried something I hadn't
- > tried yet - I tried renumbering the items. I made my button item #1, and, you
- > guessed it, this time the buttin was surrounded by the "default" rectangle.
- > You
- > can tell I haven't got much experience with this yet... Well, it certainly is
- > embarassing to post a question on the net and find your own answer within a
- > couple of minutes afterwards....
-
- Don't worry about it - there would be very few programmers who haven't at
- one time or another had their alert's come up with the a huge rounded
- rectangle around their static text items, of course once its got you once
- you just smile and say "ooops" :-)
-
- > BUT, this does bring up a couple of new questions. Within the last few weeks I
- > seem to remember a guy asking why he couldn't get a default button surrounded
- > autonatically by the "default" round-corner rectangle. Someone said that this
- > was not autonatic, and discussed ways of doing this. On my machine with THINK
- > Pascal it DOES seem to be automatic. Also, why didn't this show up in ResEdit?
- > Is this a "feature" of THINK Pascal? It must be, as I created some alerts in
- > THINK C before, and I don't recall anything being surrounded by the "default"
- > rectangle then.
-
- It is automatic for Alerts, except that the rounded rect isn't updated when
- the screen is redrawn (as far as I'm concerned, thats Apple's problem, so I
- don't put any code in to do it myself).
-
- For Dialog's, its not automatic. You can do it in one of three ways:
-
- Use Default CDEF.
- Use the System 7 only SetDialogDefaultItem call.
- Write your own user item that draws the outline.
-
- I use the latter (I posted Pascal code to do it here recently). Many
- people have had lots of success with Default, and presumably the System 7
- call works easily enough if you can depend on System 7.
-
- Have fun,
- Peter.
-
- _______________________________________________________________________
- Peter N Lewis <peter@cujo.curtin.edu.au> Ph: +61 9 368 2055
-