• 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: Custom line breaking in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom line breaking in NSTextView


  • Subject: Re: Custom line breaking in NSTextView
  • From: Aki Inoue <email@hidden>
  • Date: Wed, 27 Jul 2005 17:55:49 -0700

1) Determine which is the first character that no longer fits on the
   current line;

2) Once that character is found, go back from there and look for a
   suitable place where to break the line.

Your suggestion would allow me to customize 2), which is not what I
want; I need to customize 1).
I really don't see why you think it doesn't work. In order to fit a pre-defined number of characters in a line, you need to specify sufficiently large number for the container width. From there, the glyph position passed to the method should be always larger than the number of characters.

Note the visible window size and text container size don't have to match.

Aki
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Custom line breaking in NSTextView
      • From: email@hidden (Stefan Haller)
    • Re: Custom line breaking in NSTextView
      • From: Satoshi Matsumoto <email@hidden>
References: 
 >Re: Custom line breaking in NSTextView (From: email@hidden (Stefan Haller))

  • Prev by Date: Bindings: Where/when should dependent keys be registered? (when class with dependent keys is subclassed)
  • Next by Date: Re: Reflecting image using NSAffineTransform
  • Previous by thread: Re: Custom line breaking in NSTextView
  • Next by thread: Re: Custom line breaking in NSTextView
  • Index(es):
    • Date
    • Thread