• 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
Really confused about "bounds" and "frames".
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Really confused about "bounds" and "frames".


  • Subject: Really confused about "bounds" and "frames".
  • From: James Pengra <email@hidden>
  • Date: Sat, 14 Jun 2003 09:15:41 -0700

In a Nib file I have constructed a window which contains a scrolled view, call it MyView. The dimensions of the view (as specified in the nib file) are about twice the size of the window. In MyView.m I use the method -scrollPoint:(NSPoint)p to set the center of the view in the center of the window, which nicely centers the scrollers.
I would like to find the NSRect of that part of MyView which shows in the window, regardless of the position of the scrollers or of the size of the window.
I have studied the documentation at great length and perused all the methods of NSWindow and NSView that might yield the desired info. Under NSWindow I have tried -contentView:(NSView)view and -frame; under NSView I have tried -bounds, and -frame. All of these methods seem to give me the same information, namely the size of the view as specified in the nib file, no matter how I adjust the scrollers or the size of the window.
So, how can I get the dimensions of just that part of MyView shown in the window. I would like to get an NSRect referenced to MyView.

Thanks for any ideas, Jim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Really confused about "bounds" and "frames".
      • From: publiclook <email@hidden>
    • Re: Really confused about "bounds" and "frames".
      • From: lbland <email@hidden>
  • Prev by Date: [ANN] NSTableView Assistant
  • Next by Date: Re: Really confused about "bounds" and "frames".
  • Previous by thread: Re: [ANN] NSTableView Assistant
  • Next by thread: Re: Really confused about "bounds" and "frames".
  • Index(es):
    • Date
    • Thread