Results 1 to 5 of 5

Thread: Dropdown Buttons

  1. #1

    Thread Starter
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Resolved Dropdown Buttons

    Anyone know how to add the dropdown buttons that appear in toolbars to an ordinary form, or do I have to create my own?
    Last edited by DeadEyes; Jul 14th, 2005 at 01:07 PM.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Dropdown Buttons

    You simply display a ContextMenu when a Button is clicked.
    Code:
    private void button1_Click(object sender, System.EventArgs e)
    {
        this.contextMenu1.Show(this.button1, new Point(this.button1.Location.X, this.button1.Location.Y + this.button1.Height));
    }

  3. #3

    Thread Starter
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Resolved Re: Dropdown Buttons

    Thats pretty much what I ended up doing but I had two buttons one for clicking and one for popping up the menu.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Dropdown Buttons

    If that's something you're likely to use more than once then you could make a UserControl.

  5. #5

    Thread Starter
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Re: Dropdown Buttons

    That's what I'm doing because it's going to be part of a bigger UserControl

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