• 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: Clark Cox <email@hidden>
  • Date: Sat, 8 May 2004 17:20:35 -0400

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.


  • Follow-Ups:
    • Re: NSView's autoresizing
      • From: Matt Jaffa <email@hidden>
References: 
 >NSView's autoresizing (From: Matt Jaffa <email@hidden>)

  • Prev by Date: NSView's autoresizing
  • Next by Date: Re: Resize Matrix
  • Previous by thread: NSView's autoresizing
  • Next by thread: Re: NSView's autoresizing
  • Index(es):
    • Date
    • Thread