Hi all, I tried to understand how NSTextView works with NSScrollView, especially when wrapping disabled. My understanding is that NSTextView automatically grow its height (by default) and its width (need some tweak) according to users adding new line and adding new characters.
So I did an experiment, creating a NSTextView without a containing NSScrollView, with the following settings (for a textview within a scrollview, the following code works well), [[_aView textContainer] setContainerSize:NSMakeSize(FLT_MAX, FLT_MAX)]; [[_aView textContainer] setWidthTracksTextView:NO]; [_aView setHorizontallyResizable:YES]; [_aView setVerticallyResizable:YES]; No surprisingly, the textview auto-grows its height when I kept inserting new lines. But it refuses to grow the width. What did I miss? Thanks, Dong _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
