Re: White caret cursor, how to do it?
Re: White caret cursor, how to do it?
- Subject: Re: White caret cursor, how to do it?
- From: Greg Herlihy <email@hidden>
- Date: Sun, 19 Mar 2006 19:13:57 -0800
- Thread-topic: White caret cursor, how to do it?
Initialize an NSCursor with an image of a white I-beam cursor. Then create a
cursor rect in the NSTextView to change the cursor. The code would probably
look something like:
NSCursor * whiteIBeamCursor = [[NSCursor alloc] initWithImage:
[NSImage imageNamed:@"whiteIBeamCursor"]
hotSpot:NSMakePoint(4.0f,4.0f)];
[myTextView addCursorRect:[myTextView bounds] cursor:whiteIBeamCursor];
[whiteIBeamCursor setOnMouseEntered:YES];
Greg
On 3/19/06 3:20 PM, "Dominik Wagner" <email@hidden> wrote:
> Hi Text fans,
>
> in SubEthaEdit we offer to turn the background black which is a
> option many people use. However, there is one problem that is bugging
> our users: while the caret can be turned white (which we do) for
> contrast, the mouse cursor isn't turned white. I'd see this as a bug
> in the TextView because if you turn the caret white, obviously the
> cursor should be turned white too. However, this is the way it is so
> what can I do to change the insert caret programatically for any
> given textview?
>
> I tried usiing the NNSCursorAttributeName and applying it both to the
> default attributes as well as to the text that exists. Problem is
> that only works in the area of the view where htere is actual text.
> how do i set this cursor for the rest of the area? I tried setting
> the document cursor of the scrollview via setDocumentCursor - but
> sadly that gets resetted by the textview quite often.
>
> Any suggestions?
>
> cheers,
> dom
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden