• 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: Torsten Curdt <email@hidden>
  • Date: Thu, 15 May 2008 01:27:16 +0200

OK ...I got a little further. Turns out the resize of the window should be enough.
The size of the tabView should get adjusted automatically because of the autosize settings.


   - (void) showDetails:(BOOL)show animate:(BOOL)animate
   {
       NSSize fullSize = NSMakeSize(455, 302);

       NSRect windowFrame = [[self window] frame];

       if (show) {

           windowFrame.origin.y -= fullSize.height;
           windowFrame.size.height += fullSize.height;
           [[self window] setFrame: windowFrame
                           display: YES
                           animate: animate];

       } else {
           windowFrame.origin.y += fullSize.height;
           windowFrame.size.height -= fullSize.height;
           [[self window] setFrame: windowFrame
                           display: YES
                           animate: animate];

       }
   }

BUT ...I so don't get the autosize behavior!! Check out this little screencast


 http://vafer.org/pub/autosize.mov

The first part is as expected. But once the height of the NSTabView has been zero - it's getting ugly.

Seems like I am not alone on this

 http://katidev.com/blog/2008/02/12/why-i-say-no-to-autoresizing/

What's the best way around this for my case? I just want to show/hide the NSTabView.

cheers
--
Torsten
_______________________________________________

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: 
 >show/hide NSTabView (From: Torsten Curdt <email@hidden>)

  • Prev by Date: Re: Bypassing Interface Builder
  • Next by Date: Re: NSRange
  • Previous by thread: show/hide NSTabView
  • Next by thread: Re: show/hide NSTabView
  • Index(es):
    • Date
    • Thread