• 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
Manipulate the NSTextview, several questions...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Manipulate the NSTextview, several questions...


  • Subject: Manipulate the NSTextview, several questions...
  • From: "Cloud Strife" <email@hidden>
  • Date: Tue, 7 Oct 2008 07:50:11 +0000

Hi everyone. I am using the NSTextview to perform some functions of my
application. I want to implement:
1. The NSTextiview has several lines of output, when the user click(or
double-click) one line of the text, I want to the NSTextview to highlight
the line which the user clicked with some light color, i.e. the light blue,
the light green and so on. Then how to?
2. Following the question 1,  I also want to know which line the user select
and hence to get the content of the line. How to?

In order to describe my purpose clearly, assuming we have a nstextview with
content as following:

Line1: Content of Line1;
Line2: Content of LIne2;

When the user click the line 1, the line 1 is highlighted by light-blue
mark.
And I can use some piece of code to know the user has selected line 1, and
retrieve the content of line 1:
"Line1: Content of Line1;"
as a nsstring object.

Can anyone tell me how to accomplish these tasks? Thank you very much for
any help.
Have a good day
--
Best regards.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Manipulate the NSTextview, several questions...
      • From: Graham Cox <email@hidden>
  • Prev by Date: Issue with modal window
  • Next by Date: Re: Appropriate use of bindings?
  • Previous by thread: Re: Issue with modal window
  • Next by thread: Re: Manipulate the NSTextview, several questions...
  • Index(es):
    • Date
    • Thread