Hello is there a away to drop down my combobox using a button click?
because I'm planning to use a combobox and a button so that if the user clicks the button the combobox will drop down.
I need a button because I'm using it for a touch screen device. Thanks :)
A drop-down list is a list in which the selected item is always visible, and the others are visible on demand by clicking a drop-down button. A combo box is a combination of a standard list box or a drop-down list and an editable text box, thus allowing users to enter a value that isn't in the list.
Use this code:
private void button1_Click(object sender, EventArgs e)
{
comboBox1.DroppedDown = true;
}
hope it helps :)
Use the DroppedDown property of ComboBox
comboBox1.DroppedDown= true;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With