On Apr 30, 2005, at 11:56 AM, Will Leshner wrote:
On 4/29/05, Bob Wyttenbach <rw12 at cornell dot edu> wrote:
Ideally, I'd like all controls to receive the activate/deactivate
event when the window does, or for the window class itself to have a
boolean property "Active" that could be checked by controls.
How about if controls had an Active property that was true when the
control was active and false when it wasn't? If that sounds like it
might work, then you are in luck, because all RectControls and their
subclasses have such a property.
But your luck runs out when you attempt to use the RectControl.Active
property in the Window.Activate or Deactivate events, because the event
handlers are called before the value of Active is changed. To work
around this in Carbon apps, you can use the Window Manager function
IsWindowActive.
I just added a subsection about this to my book; see Windows:
Miscellany.
--------------
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|