EmbedWithin and Transparency

I have container control with a Listbox.
Transparent is set to OFF.
When I put the container control on the screen using EmbedWithin, the window is always transparent.
The listbox is shown, but I can see the underlying screen where the window should have been.

Dim cc As New ccCompType
cc.EmbedWithin (WindowMain, 206, 30, 874, 640)

Is this a known bug or am I doing something wrong?

Check if you designed your component with the HasCustomColor = True. At runtime it should have a HasBackColor = True.

In the IDE the CustomColor = OFF.
If I set HasBackColor = True, the background isn’t transparent anymore, but the color isn’t correct.
Since my program has to run on a Mac and Windows, the color should be the background color used by the system it’s running on.
According to the documentation Transparency should work with ContainerControl.
Xojo docs:[quote]
If True, the background shows through to the ContainerControl; if False, the ContainerControl is opaque.

ContainerControls by default are transparent controls, which means the background shows through.
The Transparent property can be set (at design time or runtime) to turn this off/on as needed.
[/quote]
When I try:

Dim cc As New ccAdmin_CompType
cc.Transparent = False
cc.EmbedWithin (WindowMain, 206, 30, 874, 640)

I get a compiling error

[quote]This item does not exist
cc.Transparent = true[/quote]

I’m beginning to believe that Transparent isn’t implemented (yet). :frowning:

As a workaround try this:

Dim cc As New ccCompType
cc.EmbedWithin (WindowMain, 206, 30, 874, 640)
cc.BackColor = cc.Parent.Window.BackColor
cc.HasBackColor=True

Sometimes going away for a few hours gives you new ideas.
Solved it by hiding the GroupBoxes on the original screen. :wink:

But the Transparent switch should work.
I’ll add the problem in Feedback.

[edit]Feedback Case #29594[/edit]
(How can I add a Feedback link?)

<[https://xojo.com/issue/29594](https://xojo.com/issue/29594)>

Thank you Rick.