Panel does not go "invisible"

mjcoon

Well-Known Member
Licensed User
I haven't used a panel to hide or show a set of controls before. Now I try it seems not to work.

The panel and its controls show up OK when I show the parent form, and I can interact with the controls.

But when I click the "OK" button and make the panel Visible = False it remains stubbornly visible complete with its controls. I can see my stuff being shown on the form underneath, and interact with it, just as it was before I introduced this panel. But the panel is obstinately in the way!

There is no method for putting the panel to the back of the z-order, and I cannot bring the form to the front (because if I try I get a message telling me to do form.show, which is where I already started!).

What am I doing wrong? OK, if is really difficult I'll post a cut-down version of this 450K program...

Mike.
 

sitajony

Active Member
Licensed User
Sorry I understood 10% of your problem: Unable to hide/show the Form with the Visible propriete:
You can hide/show the Form only if you have Show this form with Show() function, after you can hide it with Visible propriete but weirdly not on the IDE...
Control("Form1").Visible=False/True
Apparently it's a read-only propriete on IDE...

It seems to me that when you close the Form every controls are disployed so the proprietes are set by default but not sure...

Sorry if I don't understand all your problem...
 

mjcoon

Well-Known Member
Licensed User
Sorry if I don't understand all your problem...

No, it is as in the headline/subject; it is the panel that WAS the problem, not the form.

But I have discovered that it was all my own fault (just as with the last question that I asked here, sigh! :BangHead:).

I was executing the code that existed prior to introducing the panel, which ended up doing a form.Show, and this made the panel visible again! Now I have stopped doing that the behaviour is correct.

But thanks for considering my problem.

Cheers, Mike.
 
Top