Reputation: 1
How can I create a window in Mac OsX without the resize button (a fixed resolution window)?
Upvotes: 0
Views: 238
Reputation: 36101
When you programmatically create a window in Cocoa, you do a call like this
long mask = NSBorderlessWindowMask | NSTitledWindowMask | NSResizableWindowMask;
wnd = [[NSWindow alloc] initWithContentRect: rect
styleMask: mask
backing: NSBackingStoreBuffered
defer: NO];
Don't add the NSResizableWindowMask flag. In interface builder, uncheck the Resize property of the window.
Upvotes: 1
Reputation: 86671
If you are doing it in IB, the attribute is controlled by the "Resize" checkbox of the window attributes of the main window.
I'm not sure how you do it programmatically, but a combination of setContentMaxSize: setContentMinSize and setShowsResizeIndicatotr: might do it. See the Window Programming Guide for more info.
Upvotes: 0