You can add items to a ComboBox in the handler for the ComboBox.DropDown Event.
They will be added before the dropdown list is displayed;
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello
I'm looking for an event in ComboBox in .net framework WinForms which fires before the drop down menu is going to drop, when DropDownStyle is set to DropDown, so when user clicks on the far button, I add some items to the list on the fly and then the list shows. is there such event? thanks
You can add items to a ComboBox in the handler for the ComboBox.DropDown Event.
They will be added before the dropdown list is displayed;
No events before DropDown event.
If you were to implement it, you would want it to occur when F4 is pressed in the KeyDown event and when the mouse position is within the button in WM_LBUTTONDOWN.
The position of the button can be obtained using GetComboBoxInfo function.