• 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
Cursor position
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cursor position


  • Subject: Cursor position
  • From: Chaffinch <email@hidden>
  • Date: Mon, 27 Jan 2003 16:37:11 +0000 (GMT)

Hi,

I have a NSTextView contained within an NSScrollView and I want to know the
current row and column of the cursor. There is a delegate method
controlTextDidChange (or something like that) which get called for every
character key pressed, I can calculate the row and column in the text view
here.

But when the cursor is positioned with the mouse or arrow keys this method is
not called. doCommandBySelector may help me with the arrow keys, but I still
have the mouse positioning to worry about.

Alternatively, is there some other way I can get the coordinate of the cursor
within the NSWindow, and translate that to a row and column somehow????

Thanks


=====
Regards

Chaffinch
----------------------------------------------
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Cursor position
      • From: Timothy Ritchey <email@hidden>
  • Prev by Date: Re: A good method for xml usage/parsing
  • Next by Date: Re: Cursor position
  • Previous by thread: open window another class (newbie)
  • Next by thread: Re: Cursor position
  • Index(es):
    • Date
    • Thread