• 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: TextViews, LayoutManagers, TextContainers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TextViews, LayoutManagers, TextContainers


  • Subject: Re: TextViews, LayoutManagers, TextContainers
  • From: Martin Wierschin <email@hidden>
  • Date: Thu, 28 Jun 2007 19:24:23 -0700

I'd like for the contents of the text view to be a single attributed string. I'd like to be able to specify what ranges within that string are located where, so that, for example, pressing the right arrow key would move to the next expected line fragment, and selecting text in the view would produce expected results.

I'm don't know exactly what you're up to, but if possible the best would be to subclass NSTextContainer and override:


- lineFragmentRectForProposedRect:sweepDirection:movementDirection:remaini ngRect:

From there the layout manager and text view should do exactly what you want, eg: fill the provided fragments and handle navigation between them.

~Martin

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >TextViews, LayoutManagers, TextContainers (From: David Harper <email@hidden>)

  • Prev by Date: Re: Howto redraw text in NSPopUpButtonCell's
  • Next by Date: Controlling the Mouse
  • Previous by thread: TextViews, LayoutManagers, TextContainers
  • Next by thread: NSFileManager: no way to check a file meets a set of file types??
  • Index(es):
    • Date
    • Thread