• 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
Programmatically resizing an NSWindow based on window contents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Programmatically resizing an NSWindow based on window contents


  • Subject: Programmatically resizing an NSWindow based on window contents
  • From: Greg Hurrell <email@hidden>
  • Date: Thu, 11 May 2006 11:44:13 +0200

I have an NSWindow which contains an NSTableView among other things.

I have set the table view up so that it grows and shrinks as items are added to or removed from it; I want the view to resize rather than use scroll bars.

The containing window needs to grow and shrink according to the size of the table view.

What's the best way to do this?

I know I can get a reference to the window with [theTableView window] and I can send it a -setFrame: message to do the resize, but is the best way to do it? It seems very easy in Cocoa to have subviews automatically resize whenever their superview resizes, but I don't know if there's a way to achieve the same thing automatically in the opposite direction (ie. a superview or in this case a window resizing when a subview resizes).

Any tips? Thanks in advance.

Cheers,
Greg


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: Programmatically resizing an NSWindow based on window contents
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: NSDistributedNotification from root process not posted
  • Next by Date: Re: Objective-C Framework for XML-RPC
  • Previous by thread: Re: NSDistributedNotification from root process not posted
  • Next by thread: Re: Programmatically resizing an NSWindow based on window contents
  • Index(es):
    • Date
    • Thread