Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga Subject: Re: Need help rendering Gadgets Message-ID: <34626@sun.uucp> Date: Mon, 23-Nov-87 14:58:02 EST Article-I.D.: sun.34626 Posted: Mon Nov 23 14:58:02 1987 Date-Received: Thu, 26-Nov-87 07:11:42 EST References: <1980@antique.UUCP> Sender: news@sun.uucp Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 34 Yes, BOOLEAN gadgets with nothing but IntuiText and Border structures have serious problems under intuition. The only truely useful BOOLEAN gadget is one with Imagery. So the workaround/answer is to build a little baby bitmap and render your intuitext/border into it, and then munge it into an Image structure and pass that to intuition. Also On/OffGadget does not work as you might expect and can cause flashing of your Boolean gadgets. It is better (and certainly more efficient) to set or reset the GADGDISABLED flag and then call RefreshGList() with only that gadget. With neither an Image or Border struct some of Intuitions routines my get confused into believing that this is an Invisible gadget and thus the lack of response from OnGadget(). As for removing gadgets from the screen, no support at all. AddGadget() and RemoveGadget() simply manipulate the Window's gadget list. You can write one though really easily, it goes something like : void EraseGadget(w,g) struct Window *w; struct Gadget *g; { SetAPen(w->RastPort,w->BgPen); RectFill(w->RastPort,g->LeftEdge,g->TopEdge, g->LeftEdge+g->Width,g->TopEdge+g->Height); } Or you could pass in a color you wanted to use instead of the windows background pen. --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you.