• 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: customizing cursor nssearchfield
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: customizing cursor nssearchfield


  • Subject: Re: customizing cursor nssearchfield
  • From: Uli Kusterer <email@hidden>
  • Date: Thu, 04 Apr 2013 14:08:40 +0200

NSSearchField is an NSTextField subclass, which uses an NSTextFieldCell subclass (NSSearchFieldCell) to actually do most of the work. As such it uses the current field editor. So you'll have to subclass NSSearchFieldCell, add an instance variable in which you create your NSTextView subclass, and return that from -fieldEditorForView:. If you have a XIB, you can just change the "custom class" of the NSSearchFieldCell to your subclass, otherwise you are probably best off subclassing NSSearchField as well and calling setCellClass: on that.

It's a bit more subclassing than one would expect, but each subclass implements about one method, so it's a bunch of really simple subclasses.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de

On Feb 27, 2013, at 8:08 AM, Rick C. <email@hidden> wrote:
> Hi,
>
> This seems it should be easy enough, but could anyone give me pointers on how to do this?  Seems I should be subclassing NSTextView and using drawInsertionPointInRect:color:turnedOn: but how would I do this?  I don't really want to do major customization maybe just a touch thicker or a touch shorter, but the question is where?
>
> Thanks,
>
> rc
> _______________________________________________
>
> 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


_______________________________________________

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

  • Prev by Date: Re: Providing a Service without activating an app
  • Next by Date: Best approach to release app customized for the specific app-store
  • Previous by thread: Re: Custom insertion point
  • Next by thread: Best approach to release app customized for the specific app-store
  • Index(es):
    • Date
    • Thread