Results 1 to 3 of 3

Thread: BUTTON: when clicked, display 5 button underneath

  1. #1

    Thread Starter
    Registered User
    Join Date
    Oct 2021
    Posts
    3

    Post BUTTON: when clicked, display 5 button underneath

    Hi good day. Im new to this. Assume I have a form with button. When clicked, it will display 5 buttons underneath. Thanks....

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    107,746

    Re: BUTTON: when clicked, display 5 button underneath

    What have you done and where are you stuck? If you've done nothing at all, that's your problem right there. There's plenty of information around about creating new controls in code. Read up, make your best attempt and then post back if and when you encounter an actual issue.

    That said, do you even need to create Buttons in code? If you know there will be five of them then why can't you just add them in the designer and then hide and show them as required?

  3. #3
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    24,394

    Re: BUTTON: when clicked, display 5 button underneath

    Add a Panel to your app. Add your 5 buttons to the panel, then add your code to the click eventhandlers. Then in your first button’s click event handler…

    Code:
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Panel1.Visible = Not Panel1.Visible
    End Sub

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