Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# ComboBox to activate dropdown list when clicking on dropdown text

I've got a Windows Forms application written in Visual Studio 2015. Its a simple form with a couple of dropdown menus (combo boxes) and I'm wanting the dropdown list to pull down when the user clicks anywhere in the combobox frame, not only when they click on the arrow right hand side.

enter image description here

The combobox in my code is as follows:

private System.Windows.Forms.ComboBox cbxMake;
like image 880
Brendan Gooden Avatar asked Dec 05 '22 18:12

Brendan Gooden


1 Answers

I found the solution to be changing the DropDownStyle in the Appearance properties from DropDown to DropdownList

This did exactly what I was after - changing it from this

enter image description here

To this

enter image description here

Which enabled me to select the dropdown list by clicking anywhere in the box, rather than just on the arrow on the far right of the combobox.

like image 159
Brendan Gooden Avatar answered Jan 02 '23 04:01

Brendan Gooden