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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to