dcsimg
Results 1 to 1 of 1

Thread: Creating a Wizard Form with Multiple Panels

  1. #1

    Thread Starter
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    100,051

    Creating a Wizard Form with Multiple Panels

    The attached solution contains a project that displays a simple wizard. It first displays a welcome page, then a three-step input process, then a result. Each of the five stages are handled by a different Panel control. All five Panel controls are on the form at the same time but you can only see one because they all have the same Size and Location.

    If you open the Document Outline window, accessible via View -> Other Windows on the main menu, you'll be able to see the entire structure of the form. If you want to actually see a particular Panel, select it in the Document Outline window and then click the 'Move up in container' button on the toolbar until it reaches the top, at which point it will reach the front and be displayed in the designer. Just note that all controls have had their Locked property set to True, so you won't be able to do that or make any other changes by default. To unlock everything, click the form and then hit Ctrl+A to select every control, then open the Properties window and set Locked to False.

    In order to add the Panels like this in the first place, you have to take a little care. If you just double-click the Panel control in the Toolbox to add it to the form and then double-click the Panel control again, you'll add the second Panel to the first instead of to the form. You also need to be careful dragging and dropping Panels because, if the cursor is over a Panel when you drop another Panel, you will drop one Panel inside the other. If you do this by accident, you can always use the Document Outline window to move a child control out of its current container and into the next-highest one.

    What I did in this case was to add all five Panels to the form by clicking on the form in between double-clicking on the Panel control in the Toolbox. I then dragged all five Panels to different locations on the form and then configured each one separately. Once they were all complete, I dragged one to the top-left corner to get a Location and played with each one to get the required Size. I then Ctrl+clicked the Panels to select all five, then set the Location and Size in the Properties window. I then positioned the Buttons and resized the form and I was good to go.
    Attached Files Attached Files
    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
  •  



Featured


Click Here to Expand Forum to Full Width