Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!uunet!peregrine!ccicpg!felix!hplabs!ucbvax!apple.CSNET!lsr From: lsr@apple.CSNET (Larry Rosenstein) Newsgroups: comp.sys.mac Subject: Re: Graying Out Text Items Message-ID: <8706122144.AA26248@ucbvax.Berkeley.EDU> Date: Fri, 12-Jun-87 12:29:45 EDT Article-I.D.: ucbvax.8706122144.AA26248 Posted: Fri Jun 12 12:29:45 1987 Date-Received: Sat, 20-Jun-87 20:46:42 EDT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 18 Your code for GrayDItem is perfect. But the question is when do you call GrayDItem? One way is to define a UserItem. Another way is to provide a filter proc to ModalDialog that checks for update events and when it gets one, calls DialogSelect to do the update and then GrayDItem to gray out the item. The filter proc would return TRUE to indicate that it handled the event. I think it is OK to call DialogSelect for a modal dialog (that is what ModalDialog does after all). If you just gray out the item when the dialog first appears, then it will lose its grayness if an update event happens. An update event could occur, for example, if a screen saver blanks the screen while the dialog is up. (A lot of program seems to make the mistake of drawing in the dialog window and expecting it to always show up.) Larry