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

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

  • Follow-Ups:
    • Re: Programmatically resizing an NSWindow based on window contents
      • From: Mike Abdullah <email@hidden>
References: 
 >Programmatically resizing an NSWindow based on window contents (From: Greg Hurrell <email@hidden>)
 >Re: Programmatically resizing an NSWindow based on window contents (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: How to receive events fro NSColorWell
  • Next by Date: RE: How to receive events fro NSColorWell
  • Previous by thread: Re: Programmatically resizing an NSWindow based on window contents
  • Next by thread: Re: Programmatically resizing an NSWindow based on window contents
  • Index(es):
    • Date
    • Thread