• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSSplitView and NSScrollView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSplitView and NSScrollView


  • Subject: Re: NSSplitView and NSScrollView
  • From: Harry Sfougaris <email@hidden>
  • Date: Thu, 15 Oct 2009 21:00:25 +0300

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 <email@hidden> 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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >NSSplitView and NSScrollView (From: Harry Sfougaris <email@hidden>)
 >Re: NSSplitView and NSScrollView (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: How to switch the default printer?
  • Next by Date: Re: How to switch the default printer?
  • Previous by thread: Re: NSSplitView and NSScrollView
  • Next by thread: NSArrayController performance using NSManagedObject content on 10.6
  • Index(es):
    • Date
    • Thread