Container Controls .Visible Issues

I have a container control on a web page called control1.

By default it is not visible.

Before I call Web_Page1.show
I call Web_Page1. control1.visible=true

But the container is not visible

So I added a button with the following

If control1.Visible=True then MsgBox ("control1.Visible=True") Else MsgBox ("control1.Visible=False") end if

I get control1.Visible=True but the control is not visible

So I added a button that simply calls control1.Visible=True But the container still is not visible.

Search feedback for “Container” and “Visible” and didn’t see any thing.

Anybody encountered this? Anybody got a work around?

[quote=134690:@Jay Menna]I have a container control on a web page called control1.

By default it is not visible.

Before I call Web_Page1.show
I call Web_Page1. control1.visible=true

But the container is not visible

So I added a button with the following

If control1.Visible=True then MsgBox ("control1.Visible=True") Else MsgBox ("control1.Visible=False") end if

I get control1.Visible=True but the control is not visible

So I added a button that simply calls control1.Visible=True But the container still is not visible.

Search feedback for “Container” and “Visible” and didn’t see any thing.

Anybody encountered this? Anybody got a work around?[/quote]

The container control itself is not visible at run time. Only the controls you place on it.

I put a button on a container control, added an instance to the webpage, then in the Action event of a button on the page,

ContainerControl11.visible = not ContainerControl11.visible

It toggles very nicely between the two states.

@Michel Bujardet Thanks for the input.

Unfortunately using a button to show and hide the control fails t show the container (and its collection of controls)

[quote=135174:@Jay Menna]@Michel Bujardet Thanks for the input.

Unfortunately using a button to show and hide the control fails t show the container (and its collection of controls)[/quote]

I tried that before posting. Something else must be wrong with your code.

Boy, I’ve not seen anything like this and I’ve got hundreds of webPages done.

One thing that I generally dislike about Xojo is that WebPages (and Windows) have ImplicitInstance set to true by default. So when I see things like WebPage1.show I wonder if there’s not something weird going on with a hidden instance somewhere. Try turning it off for that page and do something like this:

dim pg as new Web_Page1 pg.show pg.control1.visible = true

Or, another thing to try is to add that into the shown event. I tend not to reference controls outside of the page/window. Or it might be something completely different.