lable怎样让他换行

chenminghong 2004-06-23 09:38:10
如题,也就是说lable的值可以分两行写
...全文
465 23 打赏 收藏 转发到动态 举报
写回复
用AI写文章
23 条回复
切换为时间正序
请发表友善的回复…
发表回复
youlianghao 2004-06-29
  • 打赏
  • 举报
回复
label1.caption:='str_1'+#10+#13+'str_2';
ztenv 2004-06-29
  • 打赏
  • 举报
回复
经本人证实,autosize:=false;WordWrap :=true;要写入汉字才会,不知道为什么,
sanoul 2004-06-25
  • 打赏
  • 举报
回复
上面说的都对,要看你想要的效果
yyd415 2004-06-25
  • 打赏
  • 举报
回复
英文字符:autosize:=false;WordWrap :=true;
中文字符:label1.width:=100;label1.height:=30;
//width和height要根據實際的內容和字體大小設置
label1.caption:=str1+#10+#13+ str2;
dickman 2004-06-25
  • 打赏
  • 举报
回复
label1.width:=100;
label1.height:=30
label1.caption:=str1+#10+#13+ str2;
fenglik 2004-06-25
  • 打赏
  • 举报
回复
autosize:=true;
WordWrap :=true;
Goldteerfei 2004-06-25
  • 打赏
  • 举报
回复
WordWrap :=true
行的,把autosize:=false;,我就不信不行

根本就不行。
xx123731 2004-06-25
  • 打赏
  • 举报
回复
' '+#10+' '
zjclxm 2004-06-24
  • 打赏
  • 举报
回复
WordWrap :=true
行的,把autosize:=false;,
在caption中输入“|”符号然后第二行你要输入的数据
就对了
我就不信不行
d0347 2004-06-24
  • 打赏
  • 举报
回复
' '+#10+' '
飞天揽月 2004-06-24
  • 打赏
  • 举报
回复
WordWrap :=true
行的,把autosize:=false;,我就不信不行

肯定行试试
ztenv 2004-06-23
  • 打赏
  • 举报
回复
WordWrap :=true//一定行的,把autosize:=false;,我就不信不行
chinak62 2004-06-23
  • 打赏
  • 举报
回复
大哥。直接输入是没有办法的了。只有用#13+#10。实现了。
marf_cn 2004-06-23
  • 打赏
  • 举报
回复
没办法
chenminghong 2004-06-23
  • 打赏
  • 举报
回复
好象不行
江宁侯哥 2004-06-23
  • 打赏
  • 举报
回复
WordWrap :=true;然后自己手工拖拖拽拽
chenminghong 2004-06-23
  • 打赏
  • 举报
回复
但是我要在caption里直接输入,就可以换行,那要什么做
ln521 2004-06-23
  • 打赏
  • 举报
回复
也可以用'dd'+ #13#10+'dddd'
ztenv 2004-06-23
  • 打赏
  • 举报
回复
property WordWrap: Boolean;

Description

Set WordWrap to True to allow the label to display multiple line of text. When WordWrap is True, text that is too wide for the label control wraps at the right margin and continues in additional lines.

Set WordWrap to False to limit the label to a single line. When WordWrap is False, text that is too wide for the label appears truncated.
这个在设计时就可以换行
creativepeter 2004-06-23
  • 打赏
  • 举报
回复
注意:firefox2000(网际流浪者)所说的
#13代表回车
加载更多回复(3)

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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