NSViewWidthSizable causing problems?
NSViewWidthSizable causing problems?
- Subject: NSViewWidthSizable causing problems?
- From: Joanna Carter <email@hidden>
- Date: Thu, 3 Feb 2011 08:04:44 +0000
Hi folks
I am trying to create a multi-tab NSTabView window, whose tab contents are only created when the tab is clicked on.
I have set the resizing on the tab view, in IB, to follow the size of the main form.
I have created another view, to be inserted into the NSTabViewItem, in a separate NIB and am trying to get it to resize as the parent form does.
- (void) tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem
{
int tabViewItemIdentifier = [tabView indexOfTabViewItem:tabViewItem];
switch (tabViewItemIdentifier)
{
case 0:
if (!myViewController)
{
myViewController = [[MyViewController alloc] initWithNibName:@"MyView" bundle:nil];
[tabViewItem.view addSubview:[myViewController view]];
[tabViewItem.view setAutoresizesSubviews:YES];
[myViewController.view setAutoresizesSubviews:YES];
NSUInteger resizingMask = NSViewHeightSizable | NSViewWidthSizable;
[myViewController.view setAutoresizingMask:resizingMask];
NSRect frame = [tabViewItem.view bounds];
[myViewController.view setFrame:frame];
}
…
}
The problem I have is that specifying NSViewWidthSizable as part of the resizing mask means that the parent form can no longer resize.
Have I missed something simple?
Joanna
--
Joanna Carter
Carter Consulting
_______________________________________________
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