how to highlight a non-editable NSTextView selection
how to highlight a non-editable NSTextView selection
- Subject: how to highlight a non-editable NSTextView selection
- From: "Nick Emery" <email@hidden>
- Date: Mon, 18 Jun 2001 11:27:24 +0100
- Organization: Peramon technology Ltd
i've got a non-editable NSTextView with some text in it for which i would like to provide Find functionality. i've constructed the find dialog and implemented the necessary find logic which appears to find the indicated text correctly.
i use NSTextView's setSelectedRange to select the found text and hightlight it. if i click in the text view prior to executing the find (to make it the key window), it does indeed select and hightlight the found text. however, if i don't click in the text view prior to the find (the NSTextView is not the key window), then the selected text is not hightlighted. how can i get the selected text highlighted in this situation?
--nikki