Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7905433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:28:24+00:00 2026-06-03T10:28:24+00:00

In IB this can be done easily by checking the ‘Resize’ checkbox on or

  • 0

In IB this can be done easily by checking the ‘Resize’ checkbox on or off.
My problem is I want my main NSWindow to not be resizable, until a button is clicked, and then i want it to be resizable.

I’ve scoured the Internet but can’t find anything? Can a window not be made to be resizable or not programmatically?

Thanks in advance everyone!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T10:28:25+00:00Added an answer on June 3, 2026 at 10:28 am

    Since 10.6, you can change the style mask of a window using -[NSWindow setStyleMask:]. So, you’d do something like this:

    In Objective-C

    To make it resizable:

    window.styleMask |= NSWindowStyleMaskResizable;
    

    To make it non-resizable:

    window.styleMask &= ~NSWindowStyleMaskResizable;
    

    In Swift

    To make it resizable:

    mainWindow.styleMask = mainWindow.styleMask | NSWindowStyleMaskResizable
    

    To make it non-resizable:

    mainWindow.styleMask = mainWindow.styleMask & ~NSWindowStyleMaskResizable
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wondering if this can be done easily. I am doing some paypal
I know that this can be easily done by using if(i%5 == 0 OR
Essentially, my question is: can this not be done any easier? ; and what
I'm trying to implement a Soft-deletable repository. Usually this can be easily done with
I know this can be done easily using jQuery but haven't been able to
I know this can be done and i have seen it done using some
I understand that this can be done at release using the maven-gpg-plugin. However, I
Simple question. Just wondering if this can be done without me having to enforce
This can certainly be done using a simple script and reading the database. I
I'm basically work with Middleman 2 though if this can only be done in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.