Re: Really confused about "bounds" and "frames".
Re: Really confused about "bounds" and "frames".
- Subject: Re: Really confused about "bounds" and "frames".
- From: lbland <email@hidden>
- Date: Sat, 14 Jun 2003 12:44:50 -0400
On Saturday, June 14, 2003, at 12:15 PM, James Pengra wrote:
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
hi-
maybe this would help you:
file:///Developer/Documentation/Cocoa/TasksAndConcepts/
ProgrammingTopics/DrawViews/index.html
file:///Developer/Documentation/Cocoa/TasksAndConcepts/
ProgrammingTopics/DrawViews/iViewHierarchy.html
-lance
Lance Bland
mailto:email@hidden
VVI
888-VVI-PLOT
http://www.vvi.com
_______________________________________________
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.