Re: Tab stop with fill characters
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