ToniMontana Posted May 6, 2004 Posted May 6, 2004 Hi all, I have a form with 3 areas, which are 3 panels: leftPanel, centerPanel and rightPanel. The app creates userControls which are then placed onto the panels with the call this.centerPanel.Controls.Add(userControl) for example. Then I can call Show or Hide for each userControl. So far it works fine. BUT: Now I want to have overlapping panels. But I don't know how to bring a userControl to front, userControl.BringToFront() does not work. Show() does not work either. I tried both, but it doesnt work.... Any idea? Quote Greetings, Toni.
ToniMontana Posted May 6, 2004 Author Posted May 6, 2004 Ok, I found the answer by myself: The method bringToFront does only work for the panel, because it contains the userControl. For showing a particular userControl I must first get the containing Panel and then... Control panel = userControl.Parent; panel.BringToFront(); userControl.Show(); Quote Greetings, Toni.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.