tags:

views:

83

answers:

2

Hi,

I have obtained the crosshair cursor from NSCursor crosshairCursor. Then, how can i change

to it. I don't want to call enclosingScrollView to setDocumentCursor as

[[view enclosingScrollView] setDocumentCursor:crosshaircursor ];

+1  A: 

You just use the -set method of NSCursor to set the current cursor:

[[NSCursor crosshairCursor] set];
Rob Keniger
Thanx Rob for your answer... It really help me...
iSight
A: 

You can implement a resetCursorRects method to send yourself addCursorRect:cursor: mesasges. This way, the cursor will automatically change to the crosshair whenever it enters the appointed section of your view.

Peter Hosey
That is also ok. But, currently i am fine with using set method...
iSight