I have a small problem that has been annoying me for some hours.
In my WinForms (.NET 3.5) application I create some ComboBoxes (DropDownStyle = DropDown) in a Table
This appears to be a bug in the native Windows implementation of ComboBox
with DropDownStyle
of DropDown
.
The fix detailed in the other answers here (setting the SelectionLength
property to 0 (zero) in the ComboBox
's Resize
event) works well most of the time.
However, I found that even that fix to work around this bug does not always work. If the ComboBox
is in a TableLayoutPanel
, and if that TableLayoutPanel
has more than one column with a Percent
Size Type, then that fix often does not work.
A picture is worth a thousand words. See the following screen shot of a form I made to demonstrate the problem.