Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi,

I have a status bar in my MDI Form.

Inside Status Bar I have 3 Toolstrip status label for (CAPS Lock, Scroll Lock and NUM Lock).

I have some other Information in the left hand side like login user.

I want to place them in the right side of the status bar.

Can anybody help me to resolve this issue?


Thanks and Regards
Asutosha Sarangi
Posted
Updated 6-Sep-22 11:20am

2 Solutions:
Solution 1: Like mentioned above, with a Status Strip with LayoutStyle set to Table (default), use a status strip element Spring property set to True to "expand" and push the subsequent elements to the right.
Solution 2: Change Status Strip LayoutStyle to StackWithOverflow, then use the Alignment property of each element to determine if it's on the Right or Left.
 
Share this answer
 
How do I right align controls in a StatusStrip?

Example, a StatusStrip with 4 items: toolStripStatusLabel1,toolStripStatusLabel2,toolStripStatusLabel3,toolStripStatusLabel4

Set toolStripStatusLabel2 with blank Text and on page load, set:
toolStripStatusLabel2.Spring = true;


toolStripStatusLabel1 will stay on the left side, while toolStripStatusLabel3,toolStripStatusLabel4 move to the right side.
 
Share this answer
 
v3
Comments
Asutosha 5-Aug-11 6:33am    
I Want all should come in left align only these 3 should come right align.

If am doing "RightToLeft" property then all are align to right to left.
UJimbo 5-Aug-11 7:01am    
Updated solution
Alchemist2889 18-May-12 2:47am    
THANKS UJIMBO..for making life easy
StatusStrip.RightToLeft = Yes

StatusStrip is the ID of Status bar
 
Share this answer
 
Comments
UJimbo 5-Aug-11 3:29am    
Nice timing :)

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