ComboBox like a button?
10,210
Solution 1
This is called SplitButton
and in .NET you have this available for toolbars but not for use in normal WinForms.
However, there are some alternatives such as:
Solution 2
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[]
{
"Item 1",
"Item 2",
"Item 3",
"Item 4",
"Item 5"
});
Comments
-
3D-kreativ almost 2 years
I have seen comboBoxes that looks like buttons with a small arrow to the right at the bottom, indicating that it's a drow down menu with several options. How is this done? Is there something I can change in the properties of the comboBox? Thanks!
EDIT: I'm using Windows Forms in Visual Studio 2010