Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!usc!snorkelwacker!mintaka!oliveb!amiga!jimm From: jimm@amiga.UUCP (Jim Mackraz) Newsgroups: comp.sys.amiga.tech Subject: Re: Gadget help wanted Message-ID: <5200@amiga.UUCP> Date: 12 Feb 90 19:42:49 GMT References: <1039LK-KARI@FINTUVM> <23@tmiuv0.uucp> <25d085dd:842.4comp.sys.amiga.tech;1@tronsbox.UUCP> Reply-To: jimm@superman.UUCP (Jim Mackraz) Organization: Commodore-Amiga Inc, Los Gatos CA Lines: 39 In article (HIM) writes: )>> 2. If I AddGadget() a gadget and then later on RemoveGadget() it, it will )>> be impossible to select it, but it won't disappear from the display even )>> though I call RefreshGadgets() immediately after the RemoveGadget(). ) )You have to call RemakeDisplay() I think .. that should make 100% sure )that the screen reflects ONLY what should be there. Yow, is that ever wrong. yeeussh. Intuition V1.3 and earlier has no support for erasing gadgets, so you just have to do it yourself. For most situations, I think something like this will work: SetAPen( window->RPort, 0 ); RectFill( window->RPort, g->LeftEdge, g->TopEdge, g->LeftEdge + g->Width - 1, g->TopEdge + g->Height - 1 ); If the gadget is GRELBOTTOM or something like that, you have to do more work. Likewise if it's in a requester or gimmezerozero border. jimm PS: RemakeDisplay() recalculates all intermediate and hardware copper list for the viewports of Intuition's screens. It has no effect whatsoever on the contents any bitmap, just the display instructions to get those bitmaps displayed. )Kenneth J. Jamieson: Xanadu Enterprises Inc. "Professional Amiga Software" ... which software is undoubtedly wonderful but probably doesn't use RemakeDisplay() ;^) jimm -- -------------------------------------------------- - opinions by me "This voice console is a *must*. I press Execute. `Hello, I know that you've been feeling tired. I bring you love and deeper understanding.' " -lyrics by Kate Bush