Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!ucla-cs!elroy.jpl.nasa.gov!decwrl!shelby!neon!Kermit.Stanford.EDU!philip From: philip@Kermit.Stanford.EDU (Philip Machanick) Newsgroups: comp.sys.mac.programmer Subject: Re: How to highlight buttons Keywords: button, mac, macintosh, dialog Message-ID: <1990Mar6.071221.3962@Neon.Stanford.EDU> Date: 6 Mar 90 07:12:21 GMT References: <6929@ucdavis.ucdavis.edu> <288@bii.UUCP> Sender: root@Neon.Stanford.EDU (System PRIVILEGED Account) Reply-To: philip@pescadero.stanford.edu Organization: Computer Science Department, Stanford University Lines: 20 In article <6929@ucdavis.ucdavis.edu>, lim@iris.ucdavis.edu (Lloyd Lim) writes: > My Default CDEF also draws outlines for you automatically, with the proper > color and even for unusual sizes. Plus, it's free! Sounds good. Since the original posting, I hacked together a quick attempt at a CDEF to draw the outline around a standard button. It could do with a bit of work, but it's a nice simple illustration of basics of CDEFs. In essence, I just special case drawing the control, and pass everything else to the standard CDEF. If anyone would like to see the human-readable (i.e., Pascal) source, e-mail me. I'll post it if there are enough requests. This thing is really pretty simple, if one doesn't want to get too fancy. Why doesn't Apple add it as an extra variation on a button? It would then be a small extension to the dialog manager for it to pick up such a control as the default item, no matter what its item number (well, if there was only one such in the dialog). Philip Machanick philip@pescadero.stanford.edu