Programmatically resizing an NSWindow based on window contents
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