• 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: Implementing a Find menu item like Safari?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing a Find menu item like Safari?


  • Subject: Re: Implementing a Find menu item like Safari?
  • From: Uli Kusterer <email@hidden>
  • Date: Fri, 28 Jan 2011 10:04:33 +0100

On Jan 28, 2011, at 4:43 AM, Ben Golding wrote:
> Safari has a really nice "Find" bar that scrolls down from the title pane of the window.  I'd like to do something like that in an application that I'm developing but I can't find out whether that's generally available and how to use it.

 There's nothing pre-made, but it's easy enough to make. Just create a view with a search field and the right looks embedded in it, then change its size with CoreAnimation (and maybe that of the content area).

> Further, I'd like to be able to highlight the found text in a yellow box like Safari does but again, I can't seem to find how to do that either.

 There's nothing generic, you'd have to do it by hand. But if you have an NSTextView (or can get at an NSTextField's field editor), you can use its -showFindIndicatorForRange: method.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."



_______________________________________________

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

References: 
 >Implementing a Find menu item like Safari? (From: Ben Golding <email@hidden>)

  • Prev by Date: Re: Recursive blocks
  • Next by Date: Re: Internal target="_blank" NSRequests are NIL.
  • Previous by thread: Re: Implementing a Find menu item like Safari?
  • Next by thread: Re: Implementing a Find menu item like Safari?
  • Index(es):
    • Date
    • Thread