Page 1 of 1
Gadgets lose focus when window does?
Posted: Sat Mar 27, 2004 5:05 pm
by Karbon
I've checked and re-checked to try and figure out why when I switch to another application and come back to mine the focus is gone from the last gadget that had it. Is this something that happens automatically or something I'm doing that I just haven't found yet?
Thanks!
Re: Gadgets lose focus when window does?
Posted: Sun Mar 28, 2004 4:45 am
by PB
Seems to be a bug -- no other apps behave that way. Just check for
lost/gained focus of your app, using GetForegroundWindow_() and
your WindowID(), and then use ActivateGadget to restore the gadget
focus manually. A bit of a hassle, yes, but will fix your problem.
Posted: Sun Mar 28, 2004 6:26 pm
by Karbon
Yeah, but I'd have to track what gadget had the focus when window focus was lost.. Argh
Thanks for verifying though!
Posted: Mon Mar 29, 2004 3:22 am
by PB
> I'd have to track what gadget had the focus when window focus was lost
In your main loop, just stick
handle=GetFocus_() and it'll always hold the
handle of the gadget with the focus.
