Results 1 to 4 of 4

Thread: [RESOLVED] [3.0/LINQ] Panel Problems

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2006
    Posts
    169

    Resolved [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?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2006
    Posts
    169

    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.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width