home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / amiga / programm / 15970 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.8 KB

  1. Path: sparky!uunet!cbmvax!peter
  2. From: peter@cbmvax.commodore.com (Peter Cherna)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: How should I reset a TOGGLESELECT gadget?
  5. Message-ID: <37103@cbmvax.commodore.com>
  6. Date: 17 Nov 92 16:22:25 GMT
  7. References: <haley.721869496@unixg.ubc.ca>
  8. Reply-To: peter@cbmvax.commodore.com (Peter Cherna)
  9. Organization: Commodore-Amiga, Inc.  West Chester, PA.
  10. Lines: 29
  11.  
  12. In article <haley.721869496@unixg.ubc.ca> haley@unixg.ubc.ca (Ross MacGregor) writes:
  13. >I'm trying to find the proper way change the state of a TOGGLESELECT 
  14. >gadget.  The intuition header file seems to indicated that the
  15. >SELECTED flag is read only (can be set only during initialization). 
  16. >Is this true? 
  17.  
  18. You can remove the gadget, change the SELECTED flag, add it back, and
  19. refresh it.  The only catch is that nobody erased the old imagery of
  20. the gadget, so the call to RefreshGList() will draw over it.  If your
  21. gadget has an alternate image or border for highlighting (SelectRender) and
  22. the image/border is the same size/shape as the GadgetRender image/border,
  23. then you'll be fine.  If the gadget is GADGHCOMP, then GadgetRender
  24. needs to be an Image (not a Border) whose size covers (at least) the
  25. gadget hit box.
  26.  
  27. If your gadget consists of a Border and GADGHCOMP, then nobody knows
  28. to erase the inside of the gadget hit box (it's not part of the Border).
  29. If that's what you must do, then during the time the gadget is removed,
  30. RectFill() the hit box back to background color.
  31.  
  32. >Ross MacGregor          | "NT delivers on the promise of preemptive multi- 
  33.  
  34.      Peter
  35. --
  36. Peter Cherna, User Interface Development Group, Commodore-Amiga, Inc.
  37. {uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com
  38. My opinions do not necessarily represent the opinions of my employer.
  39. "I believe it's bad luck to be superstitious."
  40.  
  41.