Windows background color
Windows background color
- Subject: Windows background color
- From: Christian Mike <email@hidden>
- Date: Mon, 16 Jul 2001 10:20:12 -0500
I am trying to set the background color of a window to black using:
[self setBackgroundColor:[NSColor blackColor]];
in the awakeFromNib method for a custom NSWindow class assigned to that
window. I know that the awakeFromNib routine is being invoked, because other
things are happening properly.
However, the background of that window never changes to black. It stays the
system default. If I check the background color at some time later (for
instance in the keyDown routine), It appears to have the "correct" thing in
it. I use:
NSLog("Color = %@", [self backgroundColor]);
to view it. Before I change it to black, the color is:
NSPatternColorSpace NSImage 0xed1630 Size={8, 8} Reps=(
NSBitmapImageRep 0xed1520 Size={8, 8}
ColorSpace=NSDeviceRGBColorSpace
BPS=8 Pixels=8x8 Alpha=NO)
After I change it, it "sticks" to:
NSCalibratedWhiteColorSpace 0 1
Why isn't my window background showing as black?
Thanks.
Michael Christian
Thomson multimedia Inc.