• 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
NSTextView/NSScrollView question (newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView/NSScrollView question (newbie)


  • Subject: NSTextView/NSScrollView question (newbie)
  • From: Duncan Campbell <email@hidden>
  • Date: Wed, 20 Apr 2005 12:34:07 +1000

Quick question:

I am setting up an NSTextView inside an NSScrollView in the normal way:

[myScrollView setDocumentView:myTextView];

I can then get the bounding rect of the textView thus:

[[myScrollView contentView] documentVisibleRect];

however, if I do the following:

[myTextView visibleRect];

If get a different rect - the "origin.x" value seems different.

Are these 2 statements identical, and if not is it possible to get the 1st one from the TextView (something like [[[myTextView superview] contentView] documentVisibleRect]).

I guess what I am asking is - how can I reference the "parent" NSScrollView FROM the NSTextView?

Cheers.

---------------------------------------------------------------
Duncan Campbell
http://www.duncanandsarah.com/duncan
---------------------------------------------------------------
 _______________________________________________
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

  • Follow-Ups:
    • Re: NSTextView/NSScrollView question (newbie)
      • From: "John C. Warner" <email@hidden>
  • Prev by Date: RE: Feature suggestions for easier debugging of Cocoa Bindings.
  • Next by Date: Re: Feature suggestions for easier debugging of Cocoa Bindings.
  • Previous by thread: Re: Printing large DB reports
  • Next by thread: Re: NSTextView/NSScrollView question (newbie)
  • Index(es):
    • Date
    • Thread