|
-
Dec 10th, 2007, 01:35 PM
#1
Thread Starter
Addicted Member
[RESOLVED] [3.0/LINQ] Panel Problems
I have 3 panels stacked on top of each other. I have 3 buttons on the right that correspond to which panel is shown. When I click button1, I want panel1 to be displayed, button2 with panel2, and so on... The problem is, I can't get it to work right for some reason. I've tried messing with the BringToFront(), Show(), Visible = true, among other things. Nothing seems to give the desired result. Can someone help?
-
Dec 10th, 2007, 09:40 PM
#2
Re: [3.0/LINQ] Panel Problems
Are you sure that all 3 Panels are on the form itself, and not one or more on another of the Panels? If not then none of those options will work properly. If they are all on the form then all those options will work properly, if properly implemented. Make sure your Panels are in the correct container first, then if it still doesn't work post your code. I suggest you use the Document Outline window to determine which control is in which container.
-
Dec 11th, 2007, 08:13 AM
#3
Thread Starter
Addicted Member
Re: [3.0/LINQ] Panel Problems
I got it working. Thanks.
I think whenever I placed the panels on top of each other, the container for the panels on top changed to the bottom panel for whatever reason. I just placed them side by side and moved them to the correct position through code when I show them. That fixed the problem.
-
Dec 11th, 2007, 05:30 PM
#4
Re: [RESOLVED] [3.0/LINQ] Panel Problems
You don't need to use code to move them. If you drag one panel onto another Panel of course it's going to end up a child control. All you need to do is put all three Panels on the form, select them all, open the Properties window and set the Location property. That will set the Location of all three Panels to the same Point without changing their Parent.
You can simply right-click on the one showing in the designer and select Send To Back in order to design the one behind it. You can also select a control in the drop-down list in the Properties window, then right-click its selection border and select Bring To Front.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|