Path: utzoo!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!ux1.lbl.gov!beard From: beard@ux1.lbl.gov (Patrick C Beard) Newsgroups: comp.sys.mac.programmer Subject: Re: Updating dialogs Keywords: update dialog icon Message-ID: <1619@helios.ee.lbl.gov> Date: 6 Jan 89 07:52:10 GMT References: <373@lclark.UUCP> Sender: usenet@helios.ee.lbl.gov Reply-To: beard@ux1.lbl.gov (Patrick C Beard) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 24 In article <373@lclark.UUCP> dan@lclark.UUCP (Dan Revel) writes: >What's the best way to update a non-modal dialog after changing one of >its dialog items? >Here's a synopsis of the code I have now: > GetDItem(...); > SetDItem(...); > DrawDialog(...); To speed things up (I'm assuming you know what you are doing with your Get/SetDItem calls) you should try using UpdtDialog(), IM IV-60, which allows you to specify the Dialog and a region to update. Just get the rectangle of the item, call RectRgn() to generate the region, and just that item will get redrawn. Now, a better way to do it might be to try a user item that calls a routine that does the PlotIcon itself, and keep an array of icons the index of which is updated when the radio button is hit. For the fastest performance do the PlotIcon immediately, and let the user item handle updates. For more info about user items, consult the Dialog Manager chapter. > >Thanks for your help! You are welcome! >Dan Patrick Beard Lawrence Berkeley Laboratory