Steven
2004.06.27, 12:28 PM
Sorry for so many questions at once - these have been piling up during the downtime. So I'm also creating NSWindows programatically to eliminate the need for a nib file in this particular instance (it's a static library; extra files are a pain)
Here's what I have:
progress = [[[NSWindow alloc] initWithContentRect:NSMakeRect(100,100,400,50) styleMask:NSTitledWindowMask | NSTexturedBackgroundWindowMask backing:NSBackingStoreRetained defer:NO] autorelease];
[progress center];
bar = [[[NSProgressIndicator alloc] initWithFrame:NSMakeRect(14,5,372,25)] autorelease];
status = [[[NSTextField alloc] initWithFrame:NSMakeRect(14,33,372,20)] autorelease];
[status setBezeled:NO];
[status setBordered:NO];
[status setEditable:NO];
[status setSelectable:NO];
[status setDrawsBackground:NO];
[status setStringValue:@"Checking for new versions..."];
[[progress contentView] addSubview:bar];
[[progress contentView] addSubview:status];
[progress setHasShadow:YES];
[progress invalidateShadow];
[progress makeKeyAndOrderFront:self];
It works perfectly except that there are ugly black areas where the window should be transparent (around the rounded corners). How do I enable the transparency? Thanks,
Steven
Here's what I have:
progress = [[[NSWindow alloc] initWithContentRect:NSMakeRect(100,100,400,50) styleMask:NSTitledWindowMask | NSTexturedBackgroundWindowMask backing:NSBackingStoreRetained defer:NO] autorelease];
[progress center];
bar = [[[NSProgressIndicator alloc] initWithFrame:NSMakeRect(14,5,372,25)] autorelease];
status = [[[NSTextField alloc] initWithFrame:NSMakeRect(14,33,372,20)] autorelease];
[status setBezeled:NO];
[status setBordered:NO];
[status setEditable:NO];
[status setSelectable:NO];
[status setDrawsBackground:NO];
[status setStringValue:@"Checking for new versions..."];
[[progress contentView] addSubview:bar];
[[progress contentView] addSubview:status];
[progress setHasShadow:YES];
[progress invalidateShadow];
[progress makeKeyAndOrderFront:self];
It works perfectly except that there are ugly black areas where the window should be transparent (around the rounded corners). How do I enable the transparency? Thanks,
Steven