How to turn off line wrap in NSTextView ?
18/01/04 10:04
Is there a way - API or other - to turn off line wrap in NSTextView ?
There is no API to turn off line wrapping, the only "trick" is to make a very large text container:
myTextContainer =[myTextView textContainer];
mySize = [myTextContainer containerSize];
mySize.width = kLARGE_CONTAINER_WIDTH ;
[myTextContainer setContainerSize:mySize];
[myTextContainer setWithTracksTextView:N0];
kLARGE_CONTAINER_WIDTH could be something like 10,000.
myTextContainer =[myTextView textContainer];
mySize = [myTextContainer containerSize];
mySize.width = kLARGE_CONTAINER_WIDTH ;
[myTextContainer setContainerSize:mySize];
[myTextContainer setWithTracksTextView:N0];
kLARGE_CONTAINER_WIDTH could be something like 10,000.