Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSTextView Question Regarding Tabs

NSTextView Question Regarding Tabs
Thread Tools
macrophyllum
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
Oct 11, 2002, 11:28 AM
 
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
     
lindberg
Dedicated MacNNer
Join Date: Jan 2001
Location: Virginia, US
Status: Offline
Reply With Quote
Oct 12, 2002, 04:19 AM
 
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.
     
macrophyllum  (op)
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
Oct 15, 2002, 11:27 AM
 
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
Guest
Status:
Reply With Quote
Oct 15, 2002, 12:48 PM
 
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 Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:25 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,