• 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
Disabled, auto-disappearing placeholder in search field like Safari, Console.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Disabled, auto-disappearing placeholder in search field like Safari, Console.app


  • Subject: Disabled, auto-disappearing placeholder in search field like Safari, Console.app
  • From: Jerry Krinock <email@hidden>
  • Date: Mon, 23 Feb 2009 20:52:08 -0800

When I bind to an NSSearchField with option key=value pair NSNullPlaceholderBindingOption="Search names", indeed "Search names" is displayed in the search field whenever the bound keyPath is nil. But it appears as normal black text which the user must overtype.

In contrast, the "Google" search field in Safari has disabled (gray) text that disappears when the field becomes the key view. The search field in Console.app has similar behavior.

I want my placeholder to behave like the ones in Safari and Console. Is this behavior built in to NSSearchField, or did they subclass it and write a little code? If it's built in, how do I get it?

Jerry Krinock

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Disabled, auto-disappearing placeholder in search field like Safari, Console.app
      • From: Andrew Farmer <email@hidden>
  • Prev by Date: Re: Moving oneself to /Applications (or ~/Applications)
  • Next by Date: Re: Simple way to traverse 2D array?
  • Previous by thread: reloading IKImageBrowserView in an IBAction
  • Next by thread: Re: Disabled, auto-disappearing placeholder in search field like Safari, Console.app
  • Index(es):
    • Date
    • Thread