TextAlign = MiddleCenter写法

wufayou419315 2010-11-07 06:25:35
this._name.TextAlign = MiddleCenter; 这句要怎么写呀,哪位知道呀?
...全文
160 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wufayou419315 2010-11-07
  • 打赏
  • 举报
回复
楼上看错了,还有个没给到分。抱歉。
wufayou419315 2010-11-07
  • 打赏
  • 举报
回复
可弹出的窗口中标题文字还是没有居中对齐。哪位知道下面这句有什么问题吗?
_name.TextAlign = ContentAlignment.MiddleCenter;



public void ShowForm()
{
switch (this.InfoState)
{
case InformStyle.Vanish://窗体隐藏
this.InfoState = InformStyle.Displaying;//设置窗体的操作状态为显示中
this.SetBounds(Rect.X, Rect.Y + Rect.Height, Rect.Width, 0);//显示Popup窗体,并放置到屏幕的底部
ShowWindow(this.Handle, 4);//显示窗体
this.timer1.Interval = 100;//设置时间间隔为100
this.timer1.Start();//启动计时器
_name.Text = cls_popup._name;
_content.Text = cls_popup._content;
_name.TextAlign = ContentAlignment.MiddleCenter;
break;
case InformStyle.Display://窗体显示
//this.timer1.Stop();//停止计时器
//this.timer1.Interval = 5000;//设置时间间隔为5000
//this.timer1.Start();//启动记时器
//break;
this.InfoState = InformStyle.Displaying;//设置窗体的操作状态为显示中
this.SetBounds(Rect.X, Rect.Y + Rect.Height, Rect.Width, 0);//显示Popup窗体,并放置到屏幕的底部
ShowWindow(this.Handle, 4);//显示窗体
this.timer1.Interval = 100;//设置时间间隔为100
this.timer1.Start();//启动计时器
_name.Text = cls_popup._name;
_content.Text = cls_popup._content;
_name.TextAlign = ContentAlignment.MiddleCenter;
break;
}
}
无涯大者 2010-11-07
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 secretgarden 的回复:]
C# code
this._name.TextAlign = ContentAlignment.MiddleCenter;
[/Quote]
Up~
SecretGarden 2010-11-07
  • 打赏
  • 举报
回复
this._name.TextAlign = ContentAlignment.MiddleCenter;

111,129

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧