• 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: NSView's autoresizing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView's autoresizing


  • Subject: Re: NSView's autoresizing
  • From: Matt Jaffa <email@hidden>
  • Date: Sat, 8 May 2004 16:35:37 -0600

Thanks,
works great.

Matt

On May 8, 2004, at 3:20 PM, Clark Cox wrote:

On May 08, 2004, at 16:44, Matt Jaffa wrote:

Hi,

In IB when you create a view and get the info on it, and if you go to
the subcategory "size",
you can make it so that view autosizes, by changing those lines to the
swirly ones.

Is there a way to do this programmatically in my code.

Like I do NSView * newview = [[NSView alloc] init];

now what would I do to make is so that this view is autosized? I was
looking at NSViews documentation, but it seems all the autosizing
methods it mentioned was used for subviews and not for the view
itself.


Use:

- (void)setAutoresizingMask:(unsigned int)mask;

The mask is built up by or'ing the following constants:

NSViewMinXMargin
NSViewWidthSizable
NSViewMaxXMargin
NSViewMinYMargin
NSViewHeightSizable
NSViewMaxYMargin

--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.
_______________________________________________
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.


References: 
 >NSView's autoresizing (From: Matt Jaffa <email@hidden>)
 >Re: NSView's autoresizing (From: Clark Cox <email@hidden>)

  • Prev by Date: Custom Frameworks, building and using
  • Next by Date: Re: Pre-defined methods - documentation?
  • Previous by thread: Re: NSView's autoresizing
  • Next by thread: Pre-defined methods - documentation?
  • Index(es):
    • Date
    • Thread