• 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: How to insert a "screen-only" character in an NSTextView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to insert a "screen-only" character in an NSTextView?


  • Subject: Re: How to insert a "screen-only" character in an NSTextView?
  • From: Kyle Sluder <email@hidden>
  • Date: Sat, 01 Sep 2012 21:00:08 -0700

On Sep 1, 2012, at 8:35 PM, Koen van der Drift <email@hidden> wrote:

>
> On Sep 1, 2012, at 11:26 PM, Kyle Sluder <email@hidden> wrote:
>
>> Why don't you just perform layout and ask the layout manager for the text it used?
>
> I'd like to make the text display in a column that is exactly x characters width.

Keep in mind that one character can generate multiple glyphs, especially since doing this seems to be why you started this thread in the first place. This is important, since characters have no visual attributes whatsoever; all drawing and metrics are done in terms of glyphs.

> I thought I need to control that with setting the size of a textcontainer?

You do indeed need to set the width of the text container.

Sounds like you want to use -maximumAdvancement.

--Kyle Sluder
_______________________________________________

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: 
 >Re: How to insert a "screen-only" character in an NSTextView? (From: Koen van der Drift <email@hidden>)
 >Re: How to insert a "screen-only" character in an NSTextView? (From: Kyle Sluder <email@hidden>)
 >Re: How to insert a "screen-only" character in an NSTextView? (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Re: How to insert a "screen-only" character in an NSTextView?
  • Next by Date: Re: Network and DarkWake
  • Previous by thread: Re: How to insert a "screen-only" character in an NSTextView?
  • Next by thread: Re: How to insert a "screen-only" character in an NSTextView?
  • Index(es):
    • Date
    • Thread