Re: customizing cursor nssearchfield
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