Partially transparent child window
Partially transparent child window
- Subject: Partially transparent child window
- From: James Bucanek <email@hidden>
- Date: Mon, 25 Sep 2006 14:16:56 -0700
I'm trying to create a child window that is partially transparent.
Some portions of the window I want to be completely transparent, letting the parent window show though, while others portions are drawn with varying degrees of transparency, from semi-transparent to fully opaque. (I'm essentialy drawing some diagrams over a set of table views, connecting cells of a table to the rows of an outline....)
I started with the code I used for a another transparent child window but suddenly realized that I was controlling the transparency of the entire window via its transparency setting (i.e. [childWindow setAlpha:0.5]).
As soon as I set the alpha of the child to 1.0, it obscures everything it overlays in the parent window. I've tried
[childWindow setBackground:[NSColor clearColor]];
[childWindow isOpaque:NO];
and every combination of backing store there is. I've also replace the child window's content view with a view that draws clearColor, colors with various alpha values, or nothing at all. It doesn't matter. No amount of alpha drawing ever composites with the contents of the parent window.
It's almost as if the child window is completely ignoring all alpha values and blindly compositing over the parent with a copy operation.
I also dug up the RoundedTransparentWindow code example and copied the relevant code verbatim. Apparently what works for main windows, but doesn't work on child windows.
Can someone at least tell me that this is either possible or impossible? Does this have to be done with a "real" window (i.e. not a child window)?
James
P.S. I'm taking the child window appoach because I thought it would be the most efficient. The parent window that contains several complex controls (tables, outlines, etc.) The contents of the overlay window are animated. My hope was to regularly update the child window without having to redraw the parent windows views over and over again.
--
James Bucanek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden