• 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: Selection and insertion point handling w/ NSTextAttachments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selection and insertion point handling w/ NSTextAttachments


  • Subject: Re: Selection and insertion point handling w/ NSTextAttachments
  • From: John Labovitz <email@hidden>
  • Date: Thu, 7 Oct 2004 10:46:10 -0700

On Oct 6, 2004, at 1:11 PM, Glen Simmons wrote:

I tried that, and while it allows selection, it doesn't feel right b/c there's that extra character.

Have you tried kerning?

I haven't tried this with attachments, but since they're just treated as glyphs, you might be able to set a kerning attribute on a range that includes the character before the attachment and the attachment itself.

You'd do this by setting the range to have the NSKernAttributeName attribute, with a value (apparently) specified in points.

I'll admit that a potential problem with this approach is if the user deletes the attachment, you'll want to remove the kerning of the previous character.

--
John Labovitz Consulting, LLC
http://mac.johnlabovitz.com
email@hidden
AIM/iChat: jslabovitz
+1 503.949.3492

_______________________________________________
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: Selection and insertion point handling w/ NSTextAttachments
      • From: Glen Simmons <email@hidden>
References: 
 >Re: Selection and insertion point handling w/ NSTextAttachments (From: "Louis C. Sacha" <email@hidden>)
 >Re: Selection and insertion point handling w/ NSTextAttachments (From: Glen Simmons <email@hidden>)

  • Prev by Date: Re: triggerChangeNotificationsForDependentKey in subclass of NSArrayController
  • Next by Date: [Wrap-up] Re: Equivelent to drawRect: for drawing after sub views are drawn
  • Previous by thread: Re: Selection and insertion point handling w/ NSTextAttachments
  • Next by thread: Re: Selection and insertion point handling w/ NSTextAttachments
  • Index(es):
    • Date
    • Thread