I have a custom control with a property Value.
The property grid
displays the editor in the dropdown style
, using the IWindowsFormsEditorService.DropDownControl(userControl)
method within the
MyUITypeEditor.EditValue(...).
The drop down editor has a text box that displays the value.
The entered text is validated in the event handler for Validating
event. With this, when enter some text and press Enter key
, the dropdown does not close down.
However, if along with Validaing
event, I hook onto TextChanged
event, then when I hit enter the dropdown closes.
In the editor code, i dont have any code to handle the Enter key.
I am wondering how the DropDownControl(...)
internally works by handling the Enter key.
Any explanation is most welcome.
Thanks