- (void)drawRect:(NSRect)rect {
// Drawing code here.
NSColor *white=[NSColor whiteColor];
[white set];
NSRectFill([self bounds]);
}
1. Do you get an error, or just nothing happens?
2. Can you post the actual code you're using to do it? In the example you give, the call is misspelled (but probably just a typo here?)
3. Are you sure that myWindow is a valid, initialized window? For example, is it connected to a window in IB? Are you trying to call setBackgroundColor: in a method that gets called before awakeFromNib:? If you are, the window might be invalid or not receive messages yet.
no it doesn't raise any error..
i made a mistake in posting...to this forum...
See my post (#2) for how to do it.
yaaa its my own app...
im trying to change using the code
[myWindow setbackgroungColor:[NSColor blackColor]];
but it....doesn't work....[/COLOR]