Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSDrawer prevent from resizing

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.

like image 490
christo16 Avatar asked Jun 07 '26 18:06

christo16


1 Answers

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:.

like image 58
Josh Freeman Avatar answered Jun 09 '26 08:06

Josh Freeman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!