I need it to be dynamic, as I am trying to build something similar to a report designer with multiple user-defined bands. My problem is that the split view just tries to "autofit" itself in the scroll view, and the size of the views changes as I resize the scroll view....

I'm doing the following:

splitVw = [[NSSplitView alloc] initWithFrame:NSMakeRect(15, 15, 900, 800)];
        [splitVw setVertical:NO];
        [splitVw setAutoresizingMask:(NSViewHeightSizable )];
        [splitVw addSubview:vw1];
        [splitVw addSubview:vw2];
        [splitVw addSubview:vw3];       
        
        [splitVw setAutoresizingMask:NSViewHeightSizable];
        [scrollVw setDocumentView:splitVw];
        

Thanks,
Harry


On 15 Οκτ 2009, at 8:53 μ.μ., Kyle Sluder wrote:

On Thu, Oct 15, 2009 at 1:31 AM, Harry Sfougaris <hsfouga...@mac.com> wrote:
I have placed a NSSplitView inside a NSScrollView in code.

Obligatory question: why are you doing this in code, and not in
Interface Builder?

However, when the user resizes one of the views so part of it outside the NSScrollView visible bounds, the NSScrollView does not display the scroll
bars.

Sounds like you have an autoresize mask problem.  Please post your
code.  If you're getting the scroll view itself from a nib (one of the
very valid reasons to be actually inserting it into the split view in
code), then please check the autoresize mask on the scroll view's
content view.

Is this not possible?

Yes, it's certainly possible, and in the majority of cases it's far
easier to do it in Interface Builder.

--Kyle Sluder

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to