Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bloom-beacon!bu-cs!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac.programmer Subject: Re: OK button and return in modeless dialog Message-ID: <14018@dartvax.Dartmouth.EDU> Date: 21 Jun 89 02:20:37 GMT References: <846@manta.NOSC.MIL> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Organization: Thayer School of Engineering Lines: 14 In article <846@manta.NOSC.MIL> lulue@manta.NOSC.MIL (Dan Lulue ) writes: >In a modal dialog the user can click the OK button or hit return and the >OK button will blink. How does one get this behavior in a modeless >dialog? Do I need to get the key down event, figure out that it was the >enter key, and then toggle the OK button? I am undoubtedly missing >something. > Yes. This is exactly what you want to do. Make sure you check for both return (13 decimal) and enter (3 decimal). Earle R. Horton "People forget how fast you did a job, but they remember how well you did it." Salada Tag Lines