• 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
setting the insertion point in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

setting the insertion point in NSTextView


  • Subject: setting the insertion point in NSTextView
  • From: Koen van der Drift <email@hidden>
  • Date: Fri, 7 Feb 2003 10:12:51 -0500

Hi,

I have an NSTextView that uses temporary attributes to hilite certain characters. This now all works fine. But when I insert a character in the text, after setting the attributes, the cursor/drawcaret/insertion point moves to the end of the text. So I thought I get the position of the insertionpoint (using selectedRange, range.location is where the insertion point is), change the attributes, and then set the insertion point back to the 'correct' position. The only method I found to set the insertionpoint is drawInsertionPointInRect. How do I convert the location to a Rect?

thanks,

- Koen.
_______________________________________________
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: setting the insertion point in NSTextView
      • From: Timothy Ritchey <email@hidden>
  • Prev by Date: Re: Action based undo or snapshot based undo? Summary!
  • Next by Date: Re: dismissing sheets.
  • Previous by thread: Re: dismissing sheets.
  • Next by thread: Re: setting the insertion point in NSTextView
  • Index(es):
    • Date
    • Thread