Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how to set some menustrip items to the left and some items to the right?

Thanks in advance.
Posted
Updated 21-Jan-14 0:36am
v2

Use Margin property of each menustrip item, to adjust them as your wish.
For example

C#
//moves first menustrip item to right side
           menuStrip1.Items[0].Margin = new Padding(100, 0, 0, 0);

           //moves second menustrip item to left side
           menuStrip1.Items[0].Margin = new Padding(0, 0, 100, 0);


If it works for you, make solution acceptable.
 
Share this answer
 
Comments
agent_kruger 21-Jan-14 7:55am    
man where were you, i was looking for the same thing, Thank you sir.
RhishikeshLathe 21-Jan-14 8:09am    
Thank you sir.
Everyday i am struggling for such things in winforms.
 
Share this answer
 
Try this..

C#
private void Form1_Load(object sender, EventArgs e)
       {
           menuStrip1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
       }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900