NSScrollView and Custom Views
NSScrollView and Custom Views
- Subject: NSScrollView and Custom Views
- From: email@hidden
- Date: Sun, 26 Jun 2005 23:50:32 -0400
I am working with an NSScrollView and a custom NSView (which right
now is just a simple rectangle with a background color). In my
diagrams below, the scroll view ("-") encloses the custom view ("+").
What I want:
------------------------
- -
- +++++++++ -
- + + -
- + + -
- + + -
- +++++++++ -
- -
------------------------
What I have:
------------------------
- -
- -
- -
+++++++++ -
+ + -
+ + -
+ + -
+++++++++---------------
Right now, the custom view is set with the Autoresizing mask of
NSViewNotSizable (which was the only way I could get it to be
scrolled by the NSScrollView). It seems to be anchored, however, to
the lower lefthand corner of my NSScrollView. I've tried using
setBoundsOrigin: and setFrameOrigin: and a multitude of other things
(in drawRect:, etc.) to try to get the custom view to be painted in
the middle of the NSClipView (I've written code that accurately
calculates where that is). However, I can't get it to budge! I
think I might be having a problem with the different "coordinate
systems" of the views and was hoping someone here might be able to
give me some direction.
Anyone have any ideas? Am I way off course?
Thanks!
Cameron
_______________________________________________
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