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. selection of a combo box shows other buttons

selection of a combo box shows other buttons

Scheduled Pinned Locked Moved C#
6 Posts 4 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.
  • D Offline
    D Offline
    danish_bear
    wrote on last edited by
    #1

    Hi, Looking for code to show after selecting from a combo box 3 other combo boxes and a submit button Thanks, Daniela

    R M 2 Replies Last reply
    0
    • D danish_bear

      Hi, Looking for code to show after selecting from a combo box 3 other combo boxes and a submit button Thanks, Daniela

      R Offline
      R Offline
      Rahul RK
      wrote on last edited by
      #2

      Make the visible property false at start up and then in the combobox_selectindex method make all controll's visible property true. Rahul Kulkarni

      D 1 Reply Last reply
      0
      • R Rahul RK

        Make the visible property false at start up and then in the combobox_selectindex method make all controll's visible property true. Rahul Kulkarni

        D Offline
        D Offline
        danish_bear
        wrote on last edited by
        #3

        Hi again, I'm quite fresh here - so could you please be more specific about "combobox_selectindex method make all controll's visible property true" ? Thanks, danish_bear

        S 1 Reply Last reply
        0
        • D danish_bear

          Hi again, I'm quite fresh here - so could you please be more specific about "combobox_selectindex method make all controll's visible property true" ? Thanks, danish_bear

          S Offline
          S Offline
          Suamal
          wrote on last edited by
          #4

          You can double click the drop down in the design , it will open the cede page with selected index changed event. There you can write code to make other dropdown visible. Set autopostback property of dropdown to true

          1 Reply Last reply
          0
          • D danish_bear

            Hi, Looking for code to show after selecting from a combo box 3 other combo boxes and a submit button Thanks, Daniela

            M Offline
            M Offline
            Mike Poz
            wrote on last edited by
            #5

            Hi Daniela, If I read your request right, you want something like this perhaps? private void Form1_Load(object sender, EventArgs e) { //some magic code you need at form initialization goes here //probably code that populates the combo boxes with whatever //values you need at startup or populate on the fly as in the //below event handler //Set your form objects to be hidden or alternatively, you can //set them to be hidden when they're initially created MySecondComboBox.Visible = false; MyThirdComboBox.Visible = false; MyFourthComboBox.Visible = false; MySubmitButton.Visible = false; } private void MyFirstComboBox_SelectedIndexChanged(object sender, EventArgs e) { //populate the combo boxes before making them visble PopulateMySecondComboBox(); PopulateMyThirdComboBox(); PopulateMyFourthComboBox(); //now make them visble MySecondComboBox.Visible = true; MyThirdComboBox.Visible = true; MyFourthComboBox.Visible = true; MySubmitButton.Visible = true; } There's supporting code for all this of course, but I will leave that to you. Hope this helps! Mike Poz

            D 1 Reply Last reply
            0
            • M Mike Poz

              Hi Daniela, If I read your request right, you want something like this perhaps? private void Form1_Load(object sender, EventArgs e) { //some magic code you need at form initialization goes here //probably code that populates the combo boxes with whatever //values you need at startup or populate on the fly as in the //below event handler //Set your form objects to be hidden or alternatively, you can //set them to be hidden when they're initially created MySecondComboBox.Visible = false; MyThirdComboBox.Visible = false; MyFourthComboBox.Visible = false; MySubmitButton.Visible = false; } private void MyFirstComboBox_SelectedIndexChanged(object sender, EventArgs e) { //populate the combo boxes before making them visble PopulateMySecondComboBox(); PopulateMyThirdComboBox(); PopulateMyFourthComboBox(); //now make them visble MySecondComboBox.Visible = true; MyThirdComboBox.Visible = true; MyFourthComboBox.Visible = true; MySubmitButton.Visible = true; } There's supporting code for all this of course, but I will leave that to you. Hope this helps! Mike Poz

              D Offline
              D Offline
              danish_bear
              wrote on last edited by
              #6

              Yes - I could use this (: Thanks !!!! Daniela danish_bear

              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