I'm setting the textContainerInset
of an NSTextView
to some values.
self.textView.textContainerInset = NSMakeSize(10, 10);
How do you make the text view selectable in the inset area? The text cursor appears but nothing happens if I try to select the text area within this inset.
Here is additional sample code you can add to a blank Cocoa Application project to see this behavior.
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSTextView *textView = [[NSTextView alloc] initWithFrame:self.window.contentView.bounds];
textView.string = @"1\n2\n3\n4\n5";
textView.textContainerInset = NSMakeSize(10, 10);
[self.window.contentView addSubview:textView];
}