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 protected])
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 [email protected]