Partly overlapping containers problem

Hi folks. I’m having a problem in my web app where there is a listbox in container 1, and then when a toolbar button is clicked, a second container is dynamically loaded using embedwithin. Trouble is, the listbox stays on top (but not the headers ??) and hides that section of container 2.
Same result if I load container 2 into WebPage1 instead of container 1. I’ve also tried dragging an instance of container 2 into WebPage1, but then nothing shows up at all when I run the app.
I’m posting a small (labeled) screenshot to help clarify the issue. Let me know if one without the text and/or bigger shot would be more helpful.

Here’s my code, in a toolbar.pressed event
(phonecont is container 1, clientscont is container 2)

Var clbox As New clientscont
clbox.EmbedWithin(self, 10, 71, clbox.Width+5, 750)

Can you create a sample app and create an Issue in Xojo Issues?

I can do that, yes, but not right away. It’s my son’s birthday. :slight_smile:

1 Like

Happy birthday to your son.

You can share a sample here and we can review it to see if something can be done.

1 Like

Here you go…really appreciate the help!
Overlap Sample

Click “Clients” in the toolbar.

BTW: the file is not a security risk…it’s just coming from my own home server.

For some reason some elements have a z-index higher than the container.
As a workaround until Ricardo review your app, you can add this code:

clbox.Style.Value("z-index") = "2"

just before clbox.EmbedWithin to get this:


SWEEEET! I knew z-index had to be the problem, just had no idea how to fix it.
I can’t thank you enough for this!!! I won’t mark this thread solved just yet, in case Ricardo comes up with something as well, but I’m perfectly happy with your solution. :smiley:

1 Like