#Flash a Gadget
7 messages in this thread
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
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
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
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
>>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
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
Caleb,
Those functions are pretty much meaningless for gadtool gadgets.