• 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
Re: Position of the selection cursor in an NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Position of the selection cursor in an NSTextField


  • Subject: Re: Position of the selection cursor in an NSTextField
  • From: Scott Little <email@hidden>
  • Date: Mon, 23 Feb 2004 20:20:05 +0100

David,

The last message that I sent regarding "Re: Filtering tableview problems" actually contains the code I was looking for to send in that message. It is similar to what I have below, and the answer is yes it will give you the cursor position even WITHOUT a selection. In that case the location is the cussor position and the .length value of the struct will be zero

Scott

Do what thy manhood bids thee do, from none but self accept applause;
He noblest lives and noblest dies who makes and keeps his self-made
laws.
- Sir Richard Francis Burton
--
scott little
email@hidden

On 23 Feb, 2004, at 19:38, David Dauer wrote:

"Scott Little" <email@hidden> schrieb am 23.02.2004 18:40 Uhr :


try [[myWindow fieldEditor: forObject:myTextField]
selectedRange].location

Although this method (selectedRange) exists for the actual field
itself, I beleive that you need to use the actual field editor (of
which there is only one per active window).

At least this is how I understand it :-)


Thanks, but I need the actual position of the cursor without that any text
is selected.
Is that possible?

Thanks again
David
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Re: Position of the selection cursor in an NSTextField (From: David Dauer <email@hidden>)

  • Prev by Date: Re: Can't open specified type in NSOpenPanel
  • Next by Date: NSTableView not responding to Drag and Drop events...
  • Previous by thread: Re: Position of the selection cursor in an NSTextField
  • Next by thread: Re: Position of the selection cursor in an NSTextField
  • Index(es):
    • Date
    • Thread