I'm noticing some strange behavior when I add a ComboBox
to my Windows Form
:
when I resize the Form
without a ComboBox
, it behaves correctly and the File menu stays where it's supposed to stay even when I drag the right corner as far left as possible. When I add the ComboBox
and I try to do the same thing, then the File menu gets pushed to the left... in my actual application the File menu completely disappears, but it's based on the same problem.
Here is the "normal" resize, where the file menu stays in the right location:
And here is the "abnormal" resize, where the file menu, the group box and the status strip all get pushed to the left:
The only difference between the two forms is the ComboBox
... does anybody have any idea why this may be happening and how can I fix it?
Update
The Left
value/property of the fileMenuStrip
becomes negative and that makes things really ugly, because I have a DataGridView
below the group boxes that is always offset to the right of 0 by a fixed padding (say 50 px). At that point the distance between the Left side of the DataGridView and the Left side of the File menu becomes 105 px, since the File menu is now at -55.
Notice that even when I scroll all the way to the left, the File menu still stays at -55... so if I have something offset from 0 by 50 (like my GridView), then at this point the difference between them will be 105 pixels.