• 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: show/hide NSTabView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: show/hide NSTabView


  • Subject: Re: show/hide NSTabView
  • From: David Dumaresq <email@hidden>
  • Date: Wed, 14 May 2008 16:38:23 -0700

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


  • Follow-Ups:
    • Re: show/hide NSTabView
      • From: Torsten Curdt <email@hidden>
  • Prev by Date: Re: NSRange
  • Next by Date: Re: NSRange
  • Previous by thread: Re: show/hide NSTabView
  • Next by thread: Re: show/hide NSTabView
  • Index(es):
    • Date
    • Thread