How to change the alpha of a window shown as a sheet?

169 views Asked by At

In cocoa, do you know how to change the alpha of a window shown as a sheet? I launch the window with this function and the app always makes the window semi-transparent, I don't want that.

- (void)beginSheet:(NSWindow *)sheet modalForWindow:(NSWindow *)docWindow modalDelegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo;

And no, calling [[awesomeFantasticWindow window] setAlphaValue:1.0] doesn't work

2

There are 2 answers

0
mdominick On

You could try setOpaque or setAlphaValue? I know it's silly but figured I'd start with the easy stuff.

0
Rob Keniger On

Just add your own custom view as the window's content view and set its color to whatever you want.