Winforms -- multi select dropdown list
There is yet another fix:
The above solution is correct to fix the first issue, where it required two clicks to enter the list of checkboxes, however, this introduces a new issue when you click the control to exit it, it retains focus and you must double click to go to another control. I was able to fix this with the following code:
In CheckBoxComboBox.cs add the following override:
protected override void OnClick(EventArgs e)
{
base.OnClick(e);
this.Parent.Focus();
}
With the answer from Rob P. and this answer, it will not hold focus on either click event.
Check out this project on CodeProject:
- CheckBox ComboBox Extending the ComboBox Class and Its Items