简体   繁体   English

可可窗口最大尺寸垂直,但不水平

[英]Cocoa window max size vertically, but not horizontally

I'd like my window to have contraints on how much it can be expanded vertically, but no constraints on horizontal expansion. 我希望我的窗口在垂直方向上可以扩展多少有矛盾,但在水平方向上没有限制。 From what I can see in the Interface Builder, If you check the box to set max window size, it automatically constrains both. 从我在“界面生成器”中所看到的,如果选中该复选框以设置最大窗口大小,它将自动限制两者。 is there any way around this? 有没有办法解决?

I don't know of a way to specify a max height without also specifying a max width. 我不知道在不指定最大宽度的情况下指定最大高度的方法。 However, you can specify a maxSize with a width as high as 9,999. 但是,您可以指定宽度最大为9,999的maxSize。

That's essentially a limitless width, since "window server limits window sizes to 10,000" , at least as of now. 这实际上是一个无限的宽度,因为至少到现在为止”“窗口服务器将窗口大小限制为10,000”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM