There is a section in size inspector with name Atosizing that can set left,right,up,down layout of a control,i find that i do that with setAutoresizingMask
but don't know how set it that my control layout to right and up (means when user resize window my control steak to right and up)
7514 次
1 回答
12
看看这些-setAutoresizingMask
参数:
NSViewNotSizable
接收器无法调整大小。
NSViewMinXMargin
接收者和它的超级视图之间的左边距是灵活的。
NSViewWidthSizable
接收器的宽度是灵活的。
NSViewMaxXMargin
接收者与其上级视图之间的右边距是灵活的。
NSViewMinYMargin
接收者和它的超级视图之间的底部边距是灵活的。
NSViewHeightSizable
接收器的高度是灵活的。
NSViewMaxYMargin
接收者和它的超级视图之间的上边距是灵活的。
所以你可以这样做:
[YourOutlet setAutoresizingMask: NSViewMinXMargin | NSViewMinYMargin];
于 2012-04-29T08:42:55.110 回答