Re: NSTextField or NSTextView with fixed baseline
Re: NSTextField or NSTextView with fixed baseline
- Subject: Re: NSTextField or NSTextView with fixed baseline
- From: Douglas Davidson <email@hidden>
- Date: Thu, 6 Oct 2005 14:07:28 -0700
On Oct 6, 2005, at 1:51 PM, Jon Steinmetz wrote:
My current prototype uses an NSTextView with no border or
background drawing but this has (at least) two problems. The first
is that the text will wrap and the second is that I have no control
over the baseline, the text lines are anchored to the top of the
frame of the text view. I could use NSTextField to solve the line
wrapping if I can still edit and retrieve RTF text. Since a
NSTextView is used as the field editor there must also be a way to
make NSTextView not wrap lines.
See the TextSizingExample for examples of how to set up a text view
so that it does not wrap. As for the baseline issue, I don't have a
prepared solution for you, but I would note that you can control the
position of the text container within the text view, for example by
overriding -textContainerOrigin.
Douglas Davidson
_______________________________________________
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