Re: NSView's autoresizing
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.