• 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: resize the NSWindow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: resize the NSWindow


  • Subject: Re: resize the NSWindow
  • From: Nathan Day <email@hidden>
  • Date: Mon, 5 Aug 2002 18:58:49 +0930

To anchor the NSTableView to the top of the content views frame go to the size info panel in IB and set turn the spring on for the bottom of the NSTableView. You can try the same thing with the NSTextField but you should really remove it from the responder chain, leaving it in can cause all sort of weird effects, just make sure you retain it first. NSViews keep their position info when remove from a view so inserting it back at the right place is easy.

On Monday, August 5, 2002, at 07:00 PM, Chong Hiu Pun wrote:

May be I have to specify more clear:

In my NSWindow, the upper part is a NSTableView, the lower part is a
NSTextField
After the resize button is click, I just want to see the upper part, the
NSTableView.
However, Nathan Day's solution will just see the lower part NSTextField
So I should I modify the code? Thanks!


----- Original Message -----
From: "Nathan Day" <email@hidden>
To: "Chong Hiu Pun" <email@hidden>
Cc: <email@hidden>
Sent: Monday, August 05, 2002 5:12 PM
Subject: Re: resize the NSWindow


You will have to change the y position also

NSRect aFrame = [myMainwin frame];
aFrame.origin.y += (aFrame.size.height - 300) ;
aFrame.size.height = 300 ; //original size is 400
[myMainwin setFrame:aFrame display:YES animate:YES];

On Monday, August 5, 2002, at 06:43 PM, Chong Hiu Pun wrote:

NSRect aFrame = [myMainwin frame];
aFrame.size.height = 300 ; //original size is 400
[myMainwin setFrame:aFrame display:YES animate:YES];

My window did become smaller. However, I want the window mimimized from
below
rather than above:

Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: resize the NSWindow
      • From: "Chong Hiu Pun" <email@hidden>
References: 
 >Re: resize the NSWindow (From: "Chong Hiu Pun" <email@hidden>)

  • Prev by Date: Re: resize the NSWindow
  • Next by Date: Re: resize the NSWindow
  • Previous by thread: Re: resize the NSWindow
  • Next by thread: Re: resize the NSWindow
  • Index(es):
    • Date
    • Thread