Click here to Skip to main content
15,884,237 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi all


I am working on windows application with mdi form

in that I have status bar displaying 3 messages but I given width it's not giving gap.

So How to give a space between status bar text?

in my result

Name: appname |domain/user |date:04/12/2013

I want

Name: app name |domain/Username|Date:04/12/2013

how can I do this?

my code is
AppName.BorderStyle = Border3DStyle.Sunken;
AppName.Text = frmtitle;
AppName.ToolTipText = frmtitle;
AppName.Width = 550;
AppName.AutoSize = true;

AppUser.BorderStyle = Border3DStyle.Raised;
AppUser.ToolTipText = username;
AppUser.Text = username;
AppUser.Width = 350;
AppUser.AutoSize = true;

AppDate.BorderStyle = Border3DStyle.Raised;
AppDate.ToolTipText = datetime;
AppDate.Text = datetime;
AppDate.AutoSize = true;
Posted
Updated 11-Apr-13 22:46pm
v3
Comments
Oshtri Deka 12-Apr-13 4:42am    
Can you share a code responsible for filling status bar text?
U@007 12-Apr-13 4:46am    
see my code is updated.

go to to the toolbar
->select the status-bar from the tool bar
->select the properties of status bar.(triangle which is displayed on status bar)
->click the edit items..add label
->go to the properties of label.. select the text property of label enter a text like "NAME" press "space bar " for how many spaces you need that many times...
ex: if enter name and click one time to space bar then it gives one space after name like this way how much gap you need press that many time the space bar..

->next add any other label give a name to it,and space bar...

name date year..... like this way..

it may useful for you try it..
 
Share this answer
 
Try setting AutoSize to False first and then set the width. Instead, you could also set MinWidth instead of Width. MinWidth will work with AutoSize but prevents the panel from becoming too small.

Good luck!
 
Share this answer
 
v3

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