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