Controls not visible on ContainerControl

I have a ContainerControl with a number of controls. Some of the controls are visible when the container is displayed. And some of them are not visible until the cursor passes over them or I click where the control should be. All controls were placed in the same way. I have tried numerous settings, and tried deleting and placing a new control. Any ideas?

Not offhand. Is this web or desktop?

That’s odd. I do this all the time. How are you sizing the container? Is this a Mac Carbon, Cocoa, or Windows app?

Desktop
Windows 8

It’s a containercontrol on top of another containercontrol

Layering of controls is BAD idea, especially in Windows. Embed the child containers within the parent container. Otherwise rethink your design.

Thank you Bob.

Just to redundantly reply…

Layering of controls for REAL/Xojo Windows is EVIL, not just BAD. Many a programming sailor has been shipwrecked by this one. Mac responds much better with the exact same layout/code, but Windows just can’t draw these things accurately.

Ha! Well, I was trying to be nice. :slight_smile:

Don’t beat around the bush Garth, just tell us what you think… :slight_smile:

Paul, what is Xojo’s position on this? Could this be considered a bug? Once I got the hang of ContainerControls, I found them to be a convenient way to isolate different sections of a complex user interface.

From the Language Reference for ContainerControl:

You can nest ContainerControls (using EmbedWithin or by creating a new ContainerControl and adding multiple ContainerControls to it), but layering them just won’t work properly.

I’m not sure I understand.

I have containercontrol1. it contains contrainercontrolleft (left edge) and containercontrolright (right edge).
ContainerControl1 is added to the window.

is this allowed?

[quote=25918:@Robert Kamarowski]I’m not sure I understand.

I have containercontrol1. it contains contrainercontrolleft (left edge) and containercontrolright (right edge).
ContainerControl1 is added to the window.

is this allowed?[/quote]
The IDE setup is pretty strange with container controls, and the guys above are probably not being very clear in regards to what they are referring to (if you’re not really aware of the mechanics).

When you create a new container, you’re actually creating a sub-class of “container control” to which all instances will be based off of, but unlike other controls where you can only add additional code base on top, with container controls you can add instances of controls much like you would with a window, so when you create an instance of that container, it come bundled with all it’s sub-controls within it.

You can also add an instance of another container to the sub-class of a container.

What the above are referring to and are assuming you have been doing, is adding two instances of a container to a window and then trying to place one inside the other. I.e. like you might do with a push button and placing it on top of a canvas

What they are advising you to do is add an instance of the secondary container to the sub-class of the primary container, so that every instance of the primary container that will be embeded to a window will have the secondary control automatically included with it, rather than add two individual containers and try “layer” them on top of each other.

And sadly I can’t edit >.<

So by all accounts you are doing exactly what they said

who’s on first… :slight_smile:

Thank you Tony. So by all accounts I’m doing it correctly.