Re: How to center a custom NSView in a NSScrollView

2009-02-26 Thread Matt Neuburg
>If the visible area (NSScrollView) is GREATER than the fixed size of >the custom NSView, the custom NSView should be positioned centered in >the NSScrollView, otherwise, the default behaviour of the scroll view >should apply. I just want to avoid that the custom NSView stays at the >bottom left (o

Re: How to center a custom NSView in a NSScrollView

2009-02-24 Thread Andrew Farmer
On 24 Feb 09, at 13:46, Meik Schuetz wrote: If the visible area (NSScrollView) is GREATER than the fixed size of the custom NSView, the custom NSView should be positioned centered in the NSScrollView, otherwise, the default behaviour of the scroll view should apply. I just want to avoid that

Re: How to center a custom NSView in a NSScrollView

2009-02-24 Thread Meik Schuetz
Hi Ben, thanks for you answer and my apologies for answering with that delay. I've already tried with a custom NSClipView, as explained here: http://www.bergdesign.com/missing_cocoa_docs/nsclipview.html This is the standard way to do this. After working some time on other subjects, I tried t

Re: How to center a custom NSView in a NSScrollView

2009-01-14 Thread Benjamin Stiglitz
> I've already tried with a custom NSClipView, as explained here: > > http://www.bergdesign.com/missing_cocoa_docs/nsclipview.html This is the standard way to do this. > The question is, how can I center a custom NSView in a NSScrollView, if > the visible width and/or height is greater than the

How to center a custom NSView in a NSScrollView

2009-01-13 Thread Meik Schuetz
Dear all, I've already tried with a custom NSClipView, as explained here: http://www.bergdesign.com/missing_cocoa_docs/nsclipview.html I also tried setting the height/width of the custom NSView to the size of the NSScrollView, but somehow I do not get it to work correctly. The question is, h