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 8031677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:11:08+00:00 2026-06-05T01:11:08+00:00

I’m having the exact same problem as in this question: Gray border when using

  • 0

I’m having the exact same problem as in this question:

Gray border when using NSBorderlessWindowMask

However, the accepted answer (as in the comments) of removing the window shadow doesn’t seem to work, at least on Lion.


I’ve subclassed NSWindow, and created a borderless window in this manner:

-(id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag {

    self = [super initWithContentRect:contentRect 
                            styleMask:(NSBorderlessWindowMask | NSResizableWindowMask)
                              backing:bufferingType 
                                defer:flag];

    [self setMovableByWindowBackground:YES];
    [self setOpaque:NO];
    [self setBackgroundColor:[NSColor clearColor]];
    [self setHasShadow:YES];

    [self setLevel:NSMainMenuWindowLevel];
    return self;
}

Please note that this app will only be run on Lion (so NSResizableWindowMask doesn’t change the appearance). I tried disabling the shadow, and toggling numerous settings for my window but I can’t seem to remove this grey border:

enter image description here

Nowhere in my code do I add a border. I simply have a NSSplitView added in Interface Builder in a window. During runtime I add the colored view as a subview to the left pane of the split view, completely filling the bounds of the left split view.

Edit: This happens even using a simple NSView, not even a split view.


TL;DR: Why does my NSView have a grey border around it?

  • 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-05T01:11:11+00:00Added an answer on June 5, 2026 at 1:11 am

    ok got it. to remove the shadow simply add this to your NSWindow subclass:

    - (BOOL)hasShadow {
        return NO;
    }
    

    and to remove the border you need to know that this border is coming from the view – not the window (just like you said it in your edit). So you have to disable the border for the view with this code:

    [myview setBorderType:NSNoBorder];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.