Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!ut-sally!pyramid!amiga!jimm From: jimm@amiga.UUCP Newsgroups: net.micro.amiga Subject: Re: help with Gadgets Message-ID: <1408@amiga.amiga.UUCP> Date: Mon, 14-Jul-86 21:15:19 EDT Article-I.D.: amiga.1408 Posted: Mon Jul 14 21:15:19 1986 Date-Received: Tue, 15-Jul-86 04:56:48 EDT References: <1925@sdcsvax.UUCP> Reply-To: jimm@homer.UUCP (Jim Mackraz) Organization: Commodore-Amiga Inc., 983 University Ave #D, Los Gatos CA 95030 Lines: 42 In article <1925@sdcsvax.UUCP> bruss@sdcsvax.UUCP (Brian Russ) writes: > > I have constructed a requester with several boolean, >TOGGLESELECT gadgets. I would like to be able to have one >gadget cancel the rest (if the user selects one to be ON, the >rest should automatically be turned OFF). Is there any way >to do this? The Intuition manual mentions a MutualExclude >flag, but it says it's not implemented!? There must be some >way of doing this since applications like TextCraft do this >sort of thing all the time. Help! MutualExclude is best done by your program as follows: RemoveGadget() (or RemoveGList()) gadgets whose state you want to change (save the 'position' returned by these calls) Set or reset the SELECTED flag on each gadget to suit AddGadget() (or AddGList()) using the 'position' above RefreshGList() to refresh the gadgets imagery. This all seems to work only with GADGIMAGE and GADGHCOMP or GADGHIMAGE, BOOLEAN gadgets only. > Also, is there any way to changes the window colors >from within a C program? In particular, I'm using a >WBENCHSCREEN window and would like to use more than four colors >as well as possibly change the original four. (Do I use >SetPrefs() for this?). Hardly. The number of colors available is based on the depth of the screen's bitmap, and is not variable between windows on the same screen. Changing the original four is possible via SetPrefs, but changing the workbench colors without the user's input must be considered a Bad Thing To Do, from a user-interface perspective. Using one's own custom screen opens up more possibilities, though. > > Brian Russ > EECS Department > UC San Diego > ...!sdcsvax!bruss Welcome aboard. Your questions indicate a creative, if not actually deranged, mind.