Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uwm.edu!bionet!agate!linus!philabs!ttidca!woodside From: woodside@ttidca.TTI.COM (George Woodside) Newsgroups: comp.sys.atari.st.tech Subject: Re: MWC & hiding objects in resources Message-ID: <25635@ttidca.TTI.COM> Date: 22 Apr 91 13:41:09 GMT References: <5796@mcrware.UUCP> <2904@atari.UUCP> <47391@ut-emx.uucp> <093029.24377@timbuk.cray.com> Organization: Citicorp/TTI, Santa Monica Lines: 27 In article <093029.24377@timbuk.cray.com> marc@sequoia.cray.com (Marc Bouron) writes: > >In article <47391@ut-emx.uucp>, sean@ccwf.cc.utexas.edu (Sean Sterling Foiles) writes: >|> I'm having trouble hiding objects within a resourcce. I've tried >|> changing the object's flag (i.e. obj.ob_flag = HIDETREE) and redrawing >|> the tree - but no go. I can do anything else (make selectable, crossed, >|> deselected, etc...) but I can't hide the object. > >I believe that the HIDETREE flag should be set for the *parent* of the object >you wish to hide. No. You hide the object by setting the HIDETREE flag bit on the object you wish to hide, but you must then redraw the parent of the object being hidden. This actually makes sense, once you think about it. When an object is hidden, it is ignored by the object drawing routines. If you draw an object, then set the HIDETREE bit, and redraw it, it gets ignored. This means that it still appears to be on the display, since there was no visible change. If you redraw the parent of the object, it replaces the old image. Then, since the hidden object gets ignored, the portion of the parent which is "behind" the hidden object continues to be visible on the display. -- * George R. Woodside - Citicorp/TTI - Santa Monica, CA * * Path: woodside@ttidca.tti.com * * or: ..!{philabs|csun|psivax}!ttidca!woodside *