|
|
NSTextView Question Regarding Tabs
|
|
|
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
I have an NSTextView and I insert a string and then a tab ("\t") and then a string and another tab and so on. This works fine except that after about 12 tabs, the text starts to wrap on itself as if somehow a carriage return got inserted.
Does anyone know how I can prevent it from doing this? Is there someway to set margins really big or something so that all of my text stays on one line?
I have looked through the documentation for NSTextView but nothing seemed obvious.
TIA
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Jan 2001
Location: Virginia, US
Status:
Offline
|
|
You might try calling setHorizontallyResizable with YES (or true in Java). That defaults to off. You may also try calling sizeToFit after inserting text if the above doesn't work by itself.
You can also call the size method on the NSTextStorage instance to get the "natural" size for the text.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
Those didn't work, but thank for the suggestions. I found a little workaround: make the text size a little smaller so I can fit more text in the text view. Not ideal, but better than before.
|
|
|
|
|
|
|
|
|
hayesk
|
|
I know with NSTextField, n IB, set the field to "scrollable" and the text allows you to type beyong the dimensions. Is there a setting for NSTextView in IB?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|