• 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: Tab stop with fill characters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tab stop with fill characters


  • Subject: Re: Tab stop with fill characters
  • From: glenn andreas <email@hidden>
  • Date: Sat, 21 Oct 2006 11:55:26 -0500


On Oct 20, 2006, at 5:52 AM, Ron DuCros wrote:

Hi,

I would like to implement tab stops with fill characters in a NSTextView.

I found a previous reference to some sample code on the list:

> I was able to find a code snippet at http://cocoa.mamasam.com/ MACOSXDEV/2002/01/1/21298.php which is roughly similar to what I want to achieve. Thanks again, > you saved my day.

However that is longer available.

Can anyone point me at some sample source or suggest a method of doing this please?

You should be able to subclass your NSLayoutManager and override drawGlyphsForGlyphRange:atPoint:


In it you'd convert the glyph range to a character range and walk through that character range in you text storage and find out if there was a tab there. If there was, convert back from that character range to a glyph range, get it's location, and draw your dotted lines as needed.


Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build, mutate, evolve, animate




_______________________________________________
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


References: 
 >Tab stop with fill characters (From: Ron DuCros <email@hidden>)

  • Prev by Date: Re: encrypting a pdf
  • Next by Date: Re: NIB Files + Views. Is it a good practice?
  • Previous by thread: Tab stop with fill characters
  • Next by thread: NSTextField selectors
  • Index(es):
    • Date
    • Thread