I am trying to get an NSSrollView with an NSTextField in it to work, however the scrollbars do not seem to respond to anything that I am coding.
I am declaring the NSScrollView as an IBOutlet, add it as a property and then synthesizing it. However, it's to no avail.
The scrollbars do appear when I resize, however they serve no function at the moment.
I have tried to use the apple documentation, but again, no joy there.
Any help? Thanks!
As You was saying "For my purposes, any container which scrolls will do the trick" You can use NSTextView
in an NSScrollView
. And for setting text You need to use setString instead setStringValue.
Example how to set text in NSTextView
:
.h
IBOutlet NSTextView *textView;
.m
-(void)awakeFromNib {
NSString *string = @"my text";
[textView setString:string];
}
Don't forget IBOutlet NSTextView
not NSScrollView
.
NSTextView
is in NSScrollView
:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With