• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSBorderlessWindowMask questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSBorderlessWindowMask questions


  • Subject: NSBorderlessWindowMask questions
  • From: Stéphane Sudre <email@hidden>
  • Date: Fri, 21 Dec 2001 16:37:19 +0100

I have a subclass of the NSWindow class. This subclass is doing this:

- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
{
NSWindow* result = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:bufferingType defer:NO];

[result setBackgroundColor: [NSColor clearColor]];

[result setAlphaValue:1.0];

[result setOpaque:NO];

[result setHasShadow: YES];

return result;
}

This code is taken from an Apple sample code IIRC.

The problem is that as soon as a Window styleMask does not contain one of the following flag:

NSTitledWindowMask, NSClosableWindowMask, NSMiniaturizableWindowMask, NSResizableWindowMask

any control (NSSlider for instance) you put in this window is not drawn in blue but in gray.

Is there a Workaround to allow controls to be drawn correctly ?


  • Prev by Date: Thanks! Was: Is an just allocated object allways set to autorelease?
  • Next by Date: Re: CriticalAlert
  • Previous by thread: Thanks! Was: Is an just allocated object allways set to autorelease?
  • Next by thread: Critical Alert - another question
  • Index(es):
    • Date
    • Thread