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. Form switching method

Form switching method

Scheduled Pinned Locked Moved C#
csharpdata-structureshelpquestion
3 Posts 2 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.
  • B Offline
    B Offline
    ben2
    wrote on last edited by
    #1

    Hi All, This is my first post in the C# section. Hope I get a reply. In my windows form application I have a TreeView on the left side of a splitter control. Tree nodes can have 2 labels say, A and B. If the user selects a node with A label on it, I want to show a form with some controls on the right side of the splitter. If the user selects a node with B label on it, I want to show a different form with different controls on the right side of the splitter. Can anyone suggest a method for form switching the way I want? Please dont ask me to use only one form and show and hide controls depending on the tree node selection. Your help will be much appreciated. TIA Binayak

    B T 2 Replies Last reply
    0
    • B ben2

      Hi All, This is my first post in the C# section. Hope I get a reply. In my windows form application I have a TreeView on the left side of a splitter control. Tree nodes can have 2 labels say, A and B. If the user selects a node with A label on it, I want to show a form with some controls on the right side of the splitter. If the user selects a node with B label on it, I want to show a different form with different controls on the right side of the splitter. Can anyone suggest a method for form switching the way I want? Please dont ask me to use only one form and show and hide controls depending on the tree node selection. Your help will be much appreciated. TIA Binayak

      B Offline
      B Offline
      ben2
      wrote on last edited by
      #2

      got it. used panels

      1 Reply Last reply
      0
      • B ben2

        Hi All, This is my first post in the C# section. Hope I get a reply. In my windows form application I have a TreeView on the left side of a splitter control. Tree nodes can have 2 labels say, A and B. If the user selects a node with A label on it, I want to show a form with some controls on the right side of the splitter. If the user selects a node with B label on it, I want to show a different form with different controls on the right side of the splitter. Can anyone suggest a method for form switching the way I want? Please dont ask me to use only one form and show and hide controls depending on the tree node selection. Your help will be much appreciated. TIA Binayak

        T Offline
        T Offline
        tdciDoug
        wrote on last edited by
        #3

        You could have also used User Controls. They would have been easier to work with since they would have each been their own class.

        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