Re: Really confused about "bounds" and "frames".
Re: Really confused about "bounds" and "frames".
- Subject: Re: Really confused about "bounds" and "frames".
- From: publiclook <email@hidden>
- Date: Sat, 14 Jun 2003 17:30:05 -0400
You mention that you studied the documentation. Why didn't you find
NSView's -visibleRect method? I genuinely want to know because I am
trying to find out why people can't find things in the documentation.
- (NSRect)visibleRect
Returns the portion of the receiver not clipped by its superviews.
Visibility is therefore defined quite simply and doesnt account for
whether other NSViews (or windows) overlap the receiver or whether the
receiver has a window at all.
During a printing operation the visible rectangle is further clipped to
the page being imaged.
See Also: isVisible (NSWindow), documentVisibleRect
(NSScrollView), documentVisibleRect (NSClipView)
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
_______________________________________________
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.
_______________________________________________
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.