>>I have been messing with gadtools.library for a couple of weeks now and have one
>>question . When I added keyboard equivalents to my prg I noticeed that the gadgets don't "flash" when I invoke the keyboard equivalent. I have tried the
>>ActivateGadget function ,but without success.
>>
>>Any Help would be appriciated.
>>Leon
There is neat bit of code I developed for X-Comm that makes the gadgets flash
when you press the key. It goes like this:
When you get the VANILLAKEY or RAWKEY message from intuition, you process it as
normal to find out what key was pressed, then call this function:
KeyGadget(struct Window *Win, struct Gadget *Gad)
{
Gad->Flags ^= GFLG_SELECTED;
RefreshGList(Gad,Win,NULL,1);
Delay(2);
Gad->Flags ^= GFLG_SELECTED;
RefreshGList(Gad,Win,NULL,1);
}
Just pass it a pointer to the window and a pointer to the gadget that the key is ascociated with, and voila! You're gadgets will flash away.
Hope this helps.
--
--
Well I guess I'd better say something witty...
--
Whom computers would destroy, they must first drive mad.