NSBorderlessWindowMask questions
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 ?