Path: utzoo!attcan!uunet!husc6!think!ephraim From: ephraim@think.COM (ephraim vishniac) Newsgroups: comp.sys.mac.programmer Subject: Re: Highlight "OK" buttons Keywords: Dialogs Message-ID: <27471@think.UUCP> Date: 7 Sep 88 17:55:57 GMT References: <3316@homxc.UUCP> <16727@apple.Apple.COM> Sender: news@think.UUCP Reply-To: ephraim@vidar.think.com.UUCP (ephraim vishniac) Organization: Thinking Machines Corporation, Cambridge, MA Lines: 29 In article <16727@apple.Apple.COM> blob@apple.com.UUCP (Brian Bechtel) writes: >In article <3316@homxc.UUCP> paco@homxc.UUCP (Herbert Throckmorton) writes: >>IM vol.1 mentions in the "Dialog Manager" section that one can >>highlight the default button in a dialog as well, but IM vol.1 doesn't >>mention how to do that deed, as far as I can tell. >Page I-407 describes how to highlight a default button in the standard >way. > PenSize(3,3); > InsetRect(displayRect, -4, -4); > FrameRoundRect(displayRect, 16, 16); That's how you *draw* the highlighting, which is only a partial answer to the question of how you highlight a button. The part that people often get wrong is *when* you highlight the button. They tend to forget that the highlighting might need refreshment (refreshing?) (redrawing?) when the dialog gets an update event. It seems like a safe tactic would be to redraw the highlighting whenever you get any update event for the dialog, but I'm sure somebody will point out to me a reason that's a bad idea... Ephraim Vishniac ephraim@think.com Thinking Machines Corporation / 245 First Street / Cambridge, MA 02142-1214 On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?"