Re: NSTextView Text Selectability
Re: NSTextView Text Selectability
- Subject: Re: NSTextView Text Selectability
- From: glenn andreas <email@hidden>
- Date: Mon, 4 Jul 2005 18:36:08 -0500
On Jul 4, 2005, at 5:24 PM, Ronnie O wrote:
Is there anyway to limit the selectability of the text in a textView?
I want only text within a certain range to be selectable. So if the
cursor drags over text, only certain text can be highlighted or
copied. I was looking at trying it through the NSTextStorage with an
attribute in NSAttributedString but I didnt see any "selectability"
attributes. I have a specific number of characters on each line of my
view, so I want to use this to make just every other line selectable.
Any options for this within the text, view or string classes?
_______________________________________________
NSTextView's Delegate:
- (NSRange)textView:(NSTextView *)textView
willChangeSelectionFromCharacterRange:(NSRange)oldSelectedCharRange
toCharacterRange:(NSRange)newSelectedCharRange;
or
- (NSArray *)textView:(NSTextView *)textView
willChangeSelectionFromCharacterRanges:(NSArray *)
oldSelectedCharRanges toCharacterRanges:(NSArray *)
newSelectedCharRanges;
if you want to support multiple selections...
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden