|
-
Jul 14th, 2005, 07:04 AM
#1
Thread Starter
Frenzied Member
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.
-
Jul 14th, 2005, 11:06 AM
#2
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));
}
-
Jul 14th, 2005, 01:06 PM
#3
Thread Starter
Frenzied Member
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.
-
Jul 14th, 2005, 01:25 PM
#4
Re: Dropdown Buttons
If that's something you're likely to use more than once then you could make a UserControl.
-
Jul 15th, 2005, 04:19 AM
#5
Thread Starter
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|