How to change IBeam caret shape in NSTextView.

  • Hello!

    When the background color is black, the IBeam caret is hard to be
    recognized because its color is also black. As an solution, Keith
    Blount proposed a workaround on 2005.

    > RE: Changing the IBeamCursor colour in an NSTextView
    > FROM : Keith Blount
    > DATE : Mon Feb 28 18:14:55 2005
    >
    > Well, I've found a sort of workaround, though it's an
    > ugly hack. I'm setting the window's
    > setAcceptsMouseMovedEvents to YES and then doing this:
    >
    > - (void)mouseMoved:(NSEvent *)theEvent
    > {
    > if ([NSCursor currentCursor] == [NSCursor
    > IBeamCursor])
    > [iBeamColor set];
    > }

    It works fine on Panther.  But on Leopard, the IBeam caret
    intolerably flickers.
    Does anybody know another workaround?

    BTW, the IBeam caret of Termial.app is not the default IBeam caret
    but an outlined one that is easy to be recognized and does not
    flicker even on Leopard.

    Satoshi
previous month october 2007 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today