Re: Multiple NSTextView in an NSScrollView -- if possible
Re: Multiple NSTextView in an NSScrollView -- if possible
- Subject: Re: Multiple NSTextView in an NSScrollView -- if possible
- From: Douglas Davidson <email@hidden>
- Date: Fri, 1 Feb 2002 11:46:22 -0800
On Friday, February 1, 2002, at 11:10 AM, Peter Horn wrote:
I'm trying to write some kind of a special terminal app to control a
command-line tool. What I want to do is get an user input, send it to
the commandline tool and then write the 'result' to a ScrollView.
What's particular is that I want an individual NSTextView for each of
the results, such that I can control editable/selectable individually
for each output.
To some extend this means I want a 'table' with an NSTextView for each
cell.
Any suggestions?
Here's a suggestion: use a single text view, and control editability
and selectability with the delegate's
textView:shouldChangeTextInRange:replacementString: and
textView:willChangeSelectionFromCharacterRange:toCharacterRange:
methods. This gives you more or less complete control over editing and
selection change.
Douglas Davidson