Really confused about "bounds" and "frames".
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.