Path: utzoo!attcan!uunet!husc6!cmcl2!rutgers!mailrus!cornell!uw-beaver!tektronix!tekig5!tekig4!bradn From: bradn@tekig4.TEK.COM (Bradford Needham) Newsgroups: comp.sys.mac.programmer Subject: Re: Highlight "OK" buttons Keywords: Dialogs Message-ID: <3186@tekig4.TEK.COM> Date: 8 Sep 88 02:47:58 GMT References: <3316@homxc.UUCP> <16727@apple.Apple.COM> <27471@think.UUCP> Reply-To: bradn@tekig4.TEK.COM (Bradford Needham) Organization: Tektronix, Inc., Beaverton, OR. Lines: 26 In article <27471@think.UUCP> ephraim@vidar.think.com.UUCP (ephraim vishniac) writes: >...That's how you *draw* the highlighting, which is only a partial answer >to the question of how you highlight a button.... I used to avoid highlighting default buttons because it seemed so complex. Now I let the Dialog Manager handle button highlighting. Here's how: In MacDraw, draw a thick-lined round-cornered rectangle. Select the rectangle and copy it to the clipboard. In ResEdit, paste your clipboard into a new PICT resource. Create a new PICT element in your dialog, giving your newly created PICT as the resource to show. Edit the rectangle of the new dialog element so it outlines your default button. Now when you display the dialog, the Dialog Manager will draw the PICT rectangle that outlines your default button. Since this method relys solely on resource modification, it needs no special handling at run-time. You can even add default highlighting to a dialog without recompiling your program. Brad Needham bradn@tekig4.TEK.COM