Re: cocoa-dev digest, Vol 2 #42 - 15 msgs
Re: cocoa-dev digest, Vol 2 #42 - 15 msgs
- Subject: Re: cocoa-dev digest, Vol 2 #42 - 15 msgs
- From: email@hidden (Henri Hansen)
- Date: Sun, 27 Jan 2002 12:12:26 +0100
Dustin Mierau writes:
>
I have a view in an NSScrollView, when the contentSize of the
>
scrollview is larger than my view I want my view to appear
>
centered within the scrollview, even as the scrollview is being
>
resized. Right now it is tagged to the bottom left. I know I can
>
return YES from the isFlipped method to tag it to the top left,
>
but like I said, I want it centered. There does not seem to be a
>
good way to do this, any ideas?
Well I'm stuck at the same problem.
I too have a window, with a NSScrollView and a NSView. The view is
smaler than the scrollView and so I want to reposition the view
centered in the scrollView. Alltough I can set the new frame for the
view and acording to the debugger the coordinates are corrct, it will
be redrawn in the position indicated by its frame.
On the other hand I have no problem to reposition and change the size
of a view, which is not connected to a scrollView, but which is
directly drawn into the window. So now i wonder if there are some
basic differences concerning a View which is connected to a
scrollView and one, which is drawn directly into a window.
greetings henri
--