Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drop Down a Combobox on button click

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 :)

like image 959
rj tubera Avatar asked Apr 27 '13 02:04

rj tubera


People also ask

What is the difference between Dropdownlist and ComboBox?

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.


2 Answers

Use this code:

    private void button1_Click(object sender, EventArgs e)
    {
        comboBox1.DroppedDown = true;
    }

hope it helps :)

like image 116
Mehran Avatar answered Oct 03 '22 05:10

Mehran


Use the DroppedDown property of ComboBox

comboBox1.DroppedDown= true;
like image 20
Akshay Avatar answered Oct 03 '22 05:10

Akshay