🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #9977

How to deselect a gadget

#9977
From: Michael Witbrock
Date: Thu, 06 Oct 1988 04:38
32 lines
1744 bytes
Thanks for all the replies: 
   The consensus is that the only way to safely have a program unselect a 
   gadget is to REMOVE the gadget, fiddle its bits, and ADD it again.
   
   This is not what I'd call neat. Maybe a general ModifyGadget() in a later 
   release?
   
   In the end, what I did was to make my program do the gadget imagery and keep track of selection status itself.
   
   
   Here is one tricky method suggested by Steve Tibbett:
   
   
   
>   I just ran into the same thing myself.  I don't think there is an official
>   way to deselect a gadget.  BUT due to a bug (or feature?), if you
>   do a refresh on a gadget that is already selected, (with the SELECTED bit
>   still set), it will complement the gadget again - thus deselecting it.
>   
>   So, a seemingly safe way to do it (safe in that if CBM ever fixes it,
>   it will still work) is:  Before fiddling with the SELECTED bits, do a
>   RefreshGList() on your gadgets (which will set everything back to
>   unselected state.

Michael

-- 
Michael.Witbrock@cs.cmu.edu mjw@cs.cmu.edu                          \
US Mail: Michael Witbrock/ Dept of Computer Science                  \
         Carnegie Mellon University/ Pittsburgh PA 15213/ USA        /\
Telephone : (412) 268 3621 [Office]  (412) 441 1724 [Home]          /  \
Technical Details
Message-ID: <3229@pt.cs.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!super!udel!rochester!pt.cs.cmu.edu!f.gp.cs.cmu.edu!mjw

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!super!udel!rochester!pt.cs.cmu.edu!f.gp.cs.cmu.edu!mjw
From: mjw@f.gp.cs.cmu.edu (Michael Witbrock)
Newsgroups: comp.sys.amiga.tech
Subject: How to deselect a gadget
Message-ID: <3229@pt.cs.cmu.edu>
Date: 6 Oct 88 04:38:06 GMT
Sender: netnews@pt.cs.cmu.edu
Reply-To: mjw@f.gp.cs.cmu.edu (Michael Witbrock)
Organization: Carnegie-Mellon University, CS/RI
Lines: 32