Making the Main Window Clear in Projucer

I started a GUI application that needs the main GUI to be transparent, or at least translucent, with a non-transparent label overlaying on top of the GUI window. I’m having issues figuring out how to do this through the Projucer and through code. In the background graphics, I set the alpha level all the way to 00. I used setOpaque(true); in the constructor, but this did not do what I intended. Any fast tips for making the main GUI window clear? Sort of embarrassing to ask such a simple question, but for some reason, I’m finding it a bit more challenging to do than I expected.

Please post your code so we can point you in a specific direction.

To make a transparent window, when you call the window constructor (for instance, with the DocumentWindow class), make sure to set the Colour to one that’s transparent like Colours::transparentBlack or Colours::transparentWhite.

1 Like

Ahem… Opaque means that you can’t see through it. Try “false”!

1 Like

D’oh, stupid confusion with the opaque bool. Never-the-less, it didn’t affect the GUI window, however, using ‘Colours::transparentWhite’ in the constructor of the DocumentWindow was the key. Totally forgot to check in that area. Thanks @Holy_City.

1 Like