views:

37

answers:

1

I have a winform app. On the menu bar, far right, I placed a dropdown box on top of it. When I resize the form the dropdown box obviously stays in the same position (x,y location). How can I get it to move propotionally to the right when the form is resized. It basically stays on the same Y axis.

I can't use a layout control since it's placed on top of the menu.

+1  A: 

You can use the Anchor property of the comboBox to do this. Simply set it to Right (probably Top and Right) through the designer.

Or to do it in code:

comboBox1.Anchor = AnchorStyles.Right;
Rhys Jones
Yep. I was able to do it from the property settings, without code.
Saif Khan