Re: show/hide NSTabView
Subject : Re: show/hide NSTabView
From: David Dumaresq <email@hidden >
Date: Wed, 14 May 2008 16:38:23 -0700
Delivered-to: email@hidden
Delivered-to: email@hidden
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:in-reply-to:content-type:mime-version:subject:date:references:x-mailer; bh=t5/Wr7v5U6nm7waFb4+rXNuoW3GsI4NnsZve9VkTk0g=; b=iwhmvK5UTovOG1Hnt46VS+I7Vh7fpOaE5wIOJTEFm7GpnMatbxzGVk/Cg3S5ugxzkOpAS1jZQSltEXk8x4LkCw+gAejZdfuLY6ui+29xey/3hPzJ0Iwq+yUs/Bme0Kk8civwrBKj3FvjmEvMH6+GRewzOPo0l2GcDlE81voIH8M=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type:mime-version:subject:date:references:x-mailer; b=PYxybwspl3/M1O4l7c2IlCYJWP9TR9TjTzku2VOr4kHIfJ3pGlQpj+lb9hdUFrbKwPk2bqDOhx6AC5HUdketebGeDswzbLEcac4ojFbo6a4GpL7+069oBmjG1hBMWKcWOcB+pfy4AJwkODEoBWNX5yfsN5QzpESMHuToyVsYtWA=
Just a guess, but perhaps try not adding fullSize.height to
windowFrame.size.height, just assign it the value of fullSize.height.
Or initialize its value to zero before the if(show) condition.
Instead of
windowFrame.size.height += fullSize.height;
^^^
try:
windowFrame.size.height = fullSize.height;
Regards,
Dave
On 14-May-08, at 12:03 PM, email@hidden wrote:
While the code below seemed to have worked OK for showing/hiding a
NSTextView I am now not really sure what's going on when using it on a
NSTabView.
- (void) showDetails:(BOOL)show animate:(BOOL)animate
{
NSSize fullSize = NSMakeSize(455, 302);
NSRect windowFrame = [[self window] frame];
if (show) {
[tabView setFrameSize:fullSize];
[tabView setNeedsDisplay:YES];
windowFrame.origin.y -= fullSize.height;
windowFrame.size.height += fullSize.height;
[[self window] setFrame: windowFrame
display: YES
animate: animate];
} else {
[tabView setFrameSize:NSMakeSize(0,0)];
[tabView setNeedsDisplay:YES];
windowFrame.origin.y += fullSize.height;
windowFrame.size.height -= fullSize.height;
[[self window] setFrame: windowFrame
display: YES
animate: animate];
}
--
Understanding is the ultimate seduction of the mind.
Go to the truth
beyond the mind.
Love is the bridge.
- Stephen Levine
_______________________________________________
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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.