• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextView Text Selectability
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSTextView Text Selectability (From: Ronnie O <email@hidden>)

  • Prev by Date: Re: Reading data from an NSTask [SOLVED]
  • Next by Date: Re: Reading data from an NSTask [SOLVED]
  • Previous by thread: NSTextView Text Selectability
  • Next by thread: Cocoa Globe/ShapeFile Library?
  • Index(es):
    • Date
    • Thread