如何在状态栏文本之间添加空格 [英] How to give a space between status bar text

查看:153
本文介绍了如何在状态栏文本之间添加空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好





我正在使用mdi格式的windows应用程序



因为我有状态栏显示3条消息,但我给出宽度它没有给出差距。



那么如何在状态栏之间留出空格文字?



我的结果



名称:appname | domain / user | date:04/12 / 2013



我想要



名称:app name | domain / Username | Date:04/12 / 2013



我该怎么做?



我的代码是

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;

推荐答案

转到工具栏

- >从中选择状态栏工具栏

- >选择状态栏的属性。(状态栏上显示的三角形)

- >点击编辑项目...添加标签

- >转到标签的属性..选择标签的文本属性输入像NAME这样的文本按空格键,多少次需要多少空格...

ex:如果输入名称并单击一次空​​格键,那么它会在名称之后给出一个空格,就像这样,你需要多少间隙按空格键很多时间..



- >接下来添加任何其他标签给它起名,空格键......



名称日期年份... ..就像这样..



它可能对你有用..
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..


首先尝试将AutoSize设置为False然后设置宽度。相反,您也可以设置MinWidth而不是Width。 MinWidth可以与AutoSize一起使用,但可以防止面板变得太小。



祝你好运!
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!


这篇关于如何在状态栏文本之间添加空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆