FROM : Shaun Wexler
DATE : Wed Aug 17 04:20:31 2005
On Aug 9, 2005, at 3:26 AM, Christiaan Hofman wrote:
> I am trying to get a child window that can become key but leave the
> focus on the parent window. Basically, I want that the parent
> window is not grayed out and can be selected and dragged without
> the child window loosing its first responder. This is very much the
> behavior of a sheet or a drawer (though I don't want the child
> window to run modal for the parent window). Simply adding a
> childWindow does not seem to be enough. Can anyone tell me what I
> could be overlooking?
You'll need to subclass both the parent window and child window.
Have the parent window include the child window in its responder
chain just ahead of its nextResponder. In the child subclass,
override -isKeyWindow to return the state of its parent window, and
override -canBecomeKeyWindow (and maybe -canBecomeMainWindow) to
return FALSE.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
DATE : Wed Aug 17 04:20:31 2005
On Aug 9, 2005, at 3:26 AM, Christiaan Hofman wrote:
> I am trying to get a child window that can become key but leave the
> focus on the parent window. Basically, I want that the parent
> window is not grayed out and can be selected and dragged without
> the child window loosing its first responder. This is very much the
> behavior of a sheet or a drawer (though I don't want the child
> window to run modal for the parent window). Simply adding a
> childWindow does not seem to be enough. Can anyone tell me what I
> could be overlooking?
You'll need to subclass both the parent window and child window.
Have the parent window include the child window in its responder
chain just ahead of its nextResponder. In the child subclass,
override -isKeyWindow to return the state of its parent window, and
override -canBecomeKeyWindow (and maybe -canBecomeMainWindow) to
return FALSE.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
| Related mails | Author | Date |
|---|---|---|
| Christiaan Hofman | Aug 9, 12:26 | |
| Shaun Wexler | Aug 17, 04:20 |






Cocoa mail archive

