tags:

views:

26

answers:

2

How do i set the position of a menuitem all the way to the right, as shown in the picture, and make sure it stays there when resizing the dockbar.

alt text

A: 

Theres no direct way to do that, but one way to do it, albeit a little dirty, is to add a new MenuStrip (if that's what you're using) to a Panel and position it to the top right. If you get it in the right place it will give the illusion of having the menu item anchored to the far right.

You may have problems with the two menus overlapping if the user shrinks the form too much, but if you give the form a minimum size this shouldn't be a problem.

Not the most elegant solution, but about as close as you'll get I think.

w69rdy
+1  A: 

Just set the menu item's Alignment = ToolStripItemAlignment.Right

Pondidum