Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!ncar!news.miami.edu!umiami!dweisman From: dweisman@umiami.ir.miami.edu (Ordinary Man) Newsgroups: comp.sys.mac.programmer Subject: Re: Updating ICONs in a dialog box Message-ID: <1991Apr3.115045.8589@umiami.ir.miami.edu> Date: 3 Apr 91 16:50:45 GMT References: <1991Apr3.142215.2787@bellcore.bellcore.com> Organization: Univ of Miami IR Lines: 36 In article <1991Apr3.142215.2787@bellcore.bellcore.com>, bobh@twinkie.bellcore.com (Robert Hettmansperger) writes: > The problem is that the text updates as I expected, but in order to get the > new icon to appear, I have to call DrawDialog to redraw the entire dialog > box. This is slow and makes the entire dialog flicker. I have tried almost > everything to get just the icon redrawn and can't come up with anything else > that works. > > Does anyone have any suggestions on how to update *only* the text and icon? Well, I'll take a stab and say that it would probably be better to use a userItem for the icon resource instead of letting the Dialog Manager deal with it. Try setting the port to the Dialog and drawing in it just like it was a window (which in truth, it really is - type GrafPtr). Call PlotIcon to change the icon in the userItem. This sounds reasonable to me.... Use your method for updating the text. I'm not really sure you even need the userItem for this. If anyone thinks otherwise, please express yourselves. > Thanks, > > Bob Hettmansperger bobh@twinkie.bellcore.com You're welcome, Dan -- /-------------------------------------------------------------------------\ | Dan Weisman - University of Miami - Florida | || || || || | |--------------------------------------------------| || || ||\ /|| | | INTERNET -----> dweisman@umiami.IR.Miami.edu | || || || | || | | BITNET -----> dweisman@umiami | ||||||| || | || | |-------------------------------------------------------------------------| | "The more I get to see, the less I understand..." - Triumph | \_________________________________________________________________________/