• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to remove focus from a window control?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to remove focus from a window control?


  • Subject: Re: How to remove focus from a window control?
  • From: Bill Cheeseman <email@hidden>
  • Date: Thu, 26 Feb 2004 19:44:55 -0500

on 2004-02-26 7:09 PM, Christian Schmitz at email@hidden
wrote:

> I'm using some Cocoa stuff in my Carbon application.
> But as soon as a Cocoa window receives the keyboard focus, I can't get
> this window to release the focus until I close the window.
>
> Is there a method like "ClearFocus" on the NSWindow class?

The question in your subject line is a little different from the question in
the body.

If you meant what you asked in the subject line, you remove focus from any
individual control within a window by setting the focus to the window
itself:

[[self window] makeFirstResponder:[self window]]

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >How to remove focus from a window control? (From: email@hidden (Christian Schmitz))

  • Prev by Date: Re: Checkboxes in an NSTableView
  • Next by Date: Re: Protocol doesn't seem to compile?
  • Previous by thread: How to remove focus from a window control?
  • Next by thread: Re: Protocol doesn't seem to compile?
  • Index(es):
    • Date
    • Thread