Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How create a form with 4 panels in the same area

How create a form with 4 panels in the same area

Scheduled Pinned Locked Moved C#
questiondesigntutorial
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    I've a form 400x300. At the start it show a panel (panel1) with its contein. When i click on OK button it hide the first panel and shows the second one (panel2) and so on since to panel4. Now in design mode how can i implement this functionality? If i insert a panel and i add its contein how can i add the second one? If i add it over the first one, how can i get access at the first one to add a new textbox for example?

    C M 2 Replies Last reply
    0
    • A Anonymous

      I've a form 400x300. At the start it show a panel (panel1) with its contein. When i click on OK button it hide the first panel and shows the second one (panel2) and so on since to panel4. Now in design mode how can i implement this functionality? If i insert a panel and i add its contein how can i add the second one? If i add it over the first one, how can i get access at the first one to add a new textbox for example?

      C Offline
      C Offline
      chriswalshie
      wrote on last edited by
      #2

      You can programatically create and control panels on the form. Simply create and dispose of a panel once you have finished with it. Create a new panel control and assign it its dimensions and location within the form.

      A R 2 Replies Last reply
      0
      • C chriswalshie

        You can programatically create and control panels on the form. Simply create and dispose of a panel once you have finished with it. Create a new panel control and assign it its dimensions and location within the form.

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        yes but new panel hide the others above, so if i need to work with the first one i can't whether i delete the others over.

        L 1 Reply Last reply
        0
        • A Anonymous

          I've a form 400x300. At the start it show a panel (panel1) with its contein. When i click on OK button it hide the first panel and shows the second one (panel2) and so on since to panel4. Now in design mode how can i implement this functionality? If i insert a panel and i add its contein how can i add the second one? If i add it over the first one, how can i get access at the first one to add a new textbox for example?

          M Offline
          M Offline
          Mr Cooper
          wrote on last edited by
          #4

          u can use the Control.BringToFront() and Control.SendToBack() ,within the designer, functions to get access to any control. Mr.Cooper

          1 Reply Last reply
          0
          • A Anonymous

            yes but new panel hide the others above, so if i need to work with the first one i can't whether i delete the others over.

            L Offline
            L Offline
            Luis Alonso Ramos
            wrote on last edited by
            #5

            Make a very big form so you can have all 4 panels side by side. And in the constructor resize the form to only have the first panel visible, and when you need to use another panel, move it to the position of the first panel. -- LuisR


            Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!

            1 Reply Last reply
            0
            • C chriswalshie

              You can programatically create and control panels on the form. Simply create and dispose of a panel once you have finished with it. Create a new panel control and assign it its dimensions and location within the form.

              R Offline
              R Offline
              R W Briggs
              wrote on last edited by
              #6

              I think that you misunderstood the question. I happen to have the same question. What I'm looking for is a mechanism to create panels with controls at design time and flip through them (ala wizard) at runtime. The pain about using panels by themselves is that it's very difficult to overlay them at design time as the designer wants to keep inserting the topmost panel into the panel in the next layer. It's a mess. The only solution I have found thus far is to create the panels in different locations and then create them at runtime, locating them where needed. It would be very nice to have a TabControl-like container control to assist with this. I myself would use a TabControl, but there's no current mechanism in place that I know of to remove the tabs. (.Net 2.0 - Whidbey Beta 1) If anyone can direct me to a resource for such a control, I'd be much obliged. Thanks, Bob Briggs

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups