开发者

NSDrawer prevent from resizing

开发者 https://www.devze.com 2022-12-22 02:58 出处:网络
Is there a way to prevent a NSDrawer from being resized?I\'ve 开发者_运维知识库tried setting the Min and Max content size to the same value and no luck.Set up an NSDrawer delegate which implements dra

Is there a way to prevent a NSDrawer from being resized? I've 开发者_运维知识库tried setting the Min and Max content size to the same value and no luck.


Set up an NSDrawer delegate which implements drawerWillResizeContents:toSize:. If the method just returns [sender contentSize], the drawer's content size won't change.

If that doesn't prevent the overall drawer size from changing, your delegate may also need to implement windowWillResize:toSize:, as mentioned in the above documentation link for drawerWillResizeContents:.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号