Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!genoa From: genoa@athena.mit.edu (Jack N Holt) Newsgroups: comp.sys.amiga.tech Subject: Re: How to setup window border gadgets? Message-ID: <1990Dec30.180904.19241@athena.mit.edu> Date: 30 Dec 90 18:09:04 GMT References: <1374@ewu.UUCP> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 43 In article <1374@ewu.UUCP> mpierce@ewu.UUCP (Mathew W. Pierce) writes: >Hi all, > >I am trying to put a boolean gadget into the top border of a window >with no success. I have initialized a boolean gadget structure, made >the associated image structure with all image data, and set the >TOPBORDER and GRELRIGHT flags in the appropriate areas. The problem >that I am having is that when I don't set the GZZGADGET flag, the image >is drawn in the right place, just left of the front/back gadgets, but I >can't activate the gadget (when I try, I get the drag bar). When I do set >the GZZGADGET flag, the gadget is drawn somewhere in the middle of the >screen. The gadget is not being drawn in a GIMMEZEROZERO window, so I >am wondering if that is the problem. > >What am I doing wrong? The gadget is supposed to be a window shrink/ >expand gadget like in WordPerfect. I want to put the gadget in a normal >smart_refresh window. > >Any help would be greatly appreciated > >Thanks, > >Matt Pierce What's happening is Intuition checks the gadget list in sequential order to see which (if any) gadget a mouse-click falls within. So, if the drag gadget precedes your gadget in the gadget list, Intuition will decide you wanted the drag gadget even though you think you're clicking your gadget. You need to make your gadget come first. AddGadget(win,gad,0) will place Gadget "gad" ahead of all other gadgets in the gadget list of Window "win". However, if you are supplying a gadget list in the NewWindow structure, I'm not sure that you can override the system gadgets. Anybody know a way around this? Anyway, if you can use AddGadget() instead, it should work. +-----------++----------------------++-----------------------------------+ | Jack Holt || genoa@athena.mit.edu || 3 Ames St #93, Cambridge MA 02139 | +-----------++----------------------++-----------------------------------+ And now for something completely different...