How to avoid being child of control?
Posted on 2007-03-30
I have a panel that displays only when a certain button is clicked. While the panel is hidden, there are a couple of text boxes and labels that display. The textboxes and labels sit on top of the panel. Once the panel shows, I call bringtofront(). This hides the textboxes and labels. It all works fine.
I drop a new textbox onto the form, not the panel. Then I move it on top of the panel. It should hide when the panel displays and vice versa. Just as the above controls do. The problem is that this new textbox acts like a child of the panel once I move it on top of the panel. The textbox will now hide when the panel hides, rather than the other way around. Why does that happen?