CompuServe Thread

#Flash a Gadget

7 messages in this thread
#40085From: David CzayaMar 13, 1994 11:41 PM
Is there an accepted way of "flashing" a GadTools button gadget if selected by a keyboard entry? If so, what is the method? David Czaya …via AutoPilot 73445,407
#40096From: Steve AhlstromMar 14, 1994 10:28 PM
case KEY_DOWN: { gadget->Flags |= SELECTED; RefreshGList(gadget, window, NULL, 1); break; } case KEY_UP: { gadget->Flags &=~SELECTED; RefreshGList(gadget, window, NULL, 1); do_whatever(); break; } -sja
#40097From: David CzayaMar 14, 1994 11:38 PM
Steve, Ok, this is virtually identical to what I use. What I was concerned with were all the warnings about refreshing gadtools gadgets in the RKM. For example: "Never selectively or forcibly refresh gadgets." — RKM Libraries p. 411 That kinda scared me off. David Czaya …via AutoPilot 73445,407
#40100From: Steve AhlstromMar 15, 1994 5:03 PM
David, Well, you've got 2 choices, code it as you are doing now (I've never seen any side effects, but the warning is there) or don't use gadtools … create your own gadgets. -sja
#40101From: David CzayaMar 15, 1994 5:23 PM
>>Well, you've got 2 choices, code it as you are doing now (I've never >>seen any side effects, but the warning is there) or don't use gadtools Ok, I just thought Commodore may have altered the rules a little on this and I hadn't heard about it. Thanks for your help. David Czaya …via AutoPilot 73445,407
#40213From: A. Caleb GattegnoMar 25, 1994 12:36 AM
Steve, Unless it's been too long since I was doing this, aren't you supposed to surround the modify with RemoveGList and AddGList? As I remember, you need to do this to prevent the chance that the gadget's state changes while you're modifying it. ACG
#40214From: Steve AhlstromMar 25, 1994 12:42 AM
Caleb, Those functions are pretty much meaningless for gadtool gadgets.