On Mar 23, 2007, at 20:52 UTC, [EMAIL PROTECTED] wrote:

> This is actually in two different apps; in one, there is nothing on
> the window but a canvas (that has AcceptFocus=False).  In the other,
> there are several other controls (some popups and a read-only
> EditField), but I explicitly do a ClearFocus, and I can tell from the
> way the controls are drawn that none of them have the focus.

OK, it turns out that ClearFocus is the culprit.  On Windows, it
*really* clears the focus; even the window doesn't get key events
anymore, which is why the "return true" in Window.KeyDown was of no
avail.

The correct way to clear the focus from the controls, in a case like
this, is to call SetFocus on the window instead.  This is surprising
for a primarily Mac developer, where Window.SetFocus and ClearFocus do
the same thing, but on Windows they are quite different.

Cheers,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to