• 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: Programmatically resizing a view which contains an NSTabView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically resizing a view which contains an NSTabView


  • Subject: Re: Programmatically resizing a view which contains an NSTabView
  • From: 陳銘崧 a.k.a. James Chen <email@hidden>
  • Date: Sun, 7 Nov 2004 22:09:24 +0800

Hi,
NSTabView contains NSTabViewItem(s) and each NSTabViewItem contains a NSView
I guess NSTabView places corresponding NSView within itself after switching the tab.
After NSTabView installs the NSView, NSTabView resizes the NSView to fit in.
So I guess that's why your second view gets wrong.


I think you could try to install your view to corresponding NSTabViewItem programmatically and dynamically.
Or simply you could first place a NSView as a placeholder in each tab view.
And then do your "autoresizing masks" strategy on those placeholder views instead view returned by NSTabViewItem.


HTH,
James
------------------------------------
Ulead Systems Inc.
James Chen
Software Engineer
Image Div.
------------------------------------
On Nov 6, 2004, at 4:21 AM, Larry Gerndt wrote:

I've been struggling with a problem for two days now, so it's time to ask for help.

 First, here's a picture that depicts the problem:
http://homepage.mac.com/sonofthesonofman/TabViewResize/

I'm developing a chat view which contains an NSTabView that has two tabs, one for Public chat, and the for Private chat.  The autoresizing masks are setup such that the chat history pane's height is flexible (i.e. grows when the chat view grows).    Each tab view has a "Show Options" disclosure button at the bottom, which, when turned on, grows the size of the view downward, so that it can display some options.   Before doing the resize,  I alter the autoresizing masks of both chat history panes (public and private ) to make them NOT flexible, do the resize, then set the masks back to flexible again.  This appears to work fine in the selected tab, but when I switch to the other tab, I see that the pane didn't resize properly, it behaves as if its autoresize masks never did get temporarily altered when the resize occurred.  The error is symmetrical (i.e. it always works right in the first tab, and is always wrong in the opposite tab, regardless which tab I start with).  Does anyone have any idea why this might be happening?
--
Larry Gerndt



AIM Handle: SonOfTheSonOfMan

Let the truth be told though the heavens fall -- James Garrison
   _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Programmatically resizing a view which contains an NSTabView (From: Larry Gerndt <email@hidden>)

  • Prev by Date: Custom NSButton highlight and state
  • Next by Date: Re: AppleEvents in Foundation tool (not working)
  • Previous by thread: Programmatically resizing a view which contains an NSTabView
  • Next by thread: Making a valid NSURL that contains Kanji characters
  • Index(es):
    • Date
    • Thread