Re: Show invisible characters in NSTextView
Re: Show invisible characters in NSTextView
- Subject: Re: Show invisible characters in NSTextView
- From: glenn andreas <email@hidden>
- Date: Mon, 10 Jan 2005 11:16:39 -0600
On Jan 10, 2005, at 10:18 AM, Vera Wahler wrote:
Hi,
I'm writing a texteditor with Cocoa in Java and I'd like to show the
special /
invisible characters of tabs, spaces and line breaks to the user.
But I can't find a method to set this property. Can anyone help me?
Thanks for help,
Vera
This was recently discussed (search the archives) but the ability to
show invisibles like this is actually a property of the font (there is
a setShowInvisibles method of NSTextView to toggle this).
Unfortunately, no font includes this ability, so instead you need to
provide your own layout manager to render it for you
(drawGlpyhsForGlyphRange:atPoint:). I'd personally recommend using
IDEKit <http://projects.gandreas.com/> (since I wrote it, of course I'd
recommend it) which provides a source editing pane you can just drop
in (and provides this functionality as well syntax coloring, popup
function, call tips, completion, split panes, etc...), though I've no
idea how well this works with Java based applications (it's just a
framework, so it should be relatively easy to add it to your project).
Glenn Andreas email@hidden
<http://www.gandreas.com/> oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
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