• 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
Re: window background color issue?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >window background color issue? (From: Red XIII <email@hidden>)

  • Prev by Date: Re: window background color issue?
  • Next by Date: Re: Batch process fro website
  • Previous by thread: Re: window background color issue?
  • Next by thread: C *char representation of PDF into NSImage
  • Index(es):
    • Date
    • Thread