Re: window background color issue?
Re: window background color issue?
- Subject: Re: window background color issue?
- From: Shawn Erickson <email@hidden>
- Date: Sun, 25 Feb 2007 07:42:29 -0800
On Feb 25, 2007, at 12:42 PM, Red XIII wrote:
however, nothing happened. Window doesn't turn transparent. Can
anyone tell me what is the problem?
I have set the AppControl to the application's delegation.
Try the following... Setting the windows background doesn't cause a
redisplay of the window.
- (void) applicationDidFinishLaunching:(NSNotification*)aNotification{
printf("here\n");// In the console, this code executed.
[window setTitle:@"Color"];
[window setBackgroundColor:[NSColor colorWithCalibratedWhite:0.5
alpha:0.5]];
[window setOpaque:NO];
[window display];
[NSTimer scheduledTimerWithTimeInterval:1/10
target:self
selector:@selector(changeColor)
userInfo:nil
repeats:YES];
}
- (void) changeColor
{
static int whiteValue = 128;
whiteValue = (whiteValue + 2) % 255;
[window setBackgroundColor:[NSColor
colorWithCalibratedWhite:whiteValue/255.0 alpha:0.5]];
[window display];
}
-Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden