Re: Programmatically resizing an NSWindow based on window contents
Re: Programmatically resizing an NSWindow based on window contents
- Subject: Re: Programmatically resizing an NSWindow based on window contents
- From: Greg Hurrell <email@hidden>
- Date: Thu, 11 May 2006 14:59:11 +0200
El 11/05/2006, a las 14:08, Mike Abdullah escribió:
Yes, you want setFrame:display: or setFrame:display:animate
depending on what you need. There is not (as far as I am aware) a
way of making your window autosize based on the controls.
Thanks for chiming in.
I'd have thought a better approach would be to make your tableview
autosize with the window, and then only adjust the size of the
window yourself.
In 99% of cases I would agree, but this is a special case in which
the window is not resizable by the user, but depends on the size of
the table view. For an example that comes from Apple code, think of
the sheet that pops down when you edit rules in Mail.app: the user
can't resize the sheet but the sheet automatically grows and shrinks
and you add or remove rules from the rule list. The Mail.app example
uses a custom NSView class as far as I can tell, but I'm using
NSTableView so as not to have to re-invent the wheel...
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