Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnVCL 组件包
» cnbitbtn按钮,caption显示不能换行问题
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: cnbitbtn按钮,caption显示不能换行问题
softyes
普通灌水员
UID 41023
Digest Posts
1
Credits 50
Posts 15
点点分 50
Reading Access 10
Registered 2008-9-28
Status Offline
#1
Post at 2014-8-26 10:51
Profile
|
Blog
|
P.M.
|
cnbitbtn按钮,caption显示不能换行问题
1.Label1.caption:='liquanhai'+#13#10+'liquanhai'; 注意:label1的autosize必须为true;在默认下也为true.
2.label1.Caption:='liquanhai'+chr(13)+chr(10)+'liquanhai';
2.memo1.Lines.Add('liquanhai'+#13#10+'liquanhai');
cnbitbtn按钮,caption显示不能换行问题
http://www.SoftYes.com
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#2
Post at 2014-8-28 22:47
Profile
|
Blog
|
P.M.
其实,是没有实现此功能。
softyes
普通灌水员
UID 41023
Digest Posts
1
Credits 50
Posts 15
点点分 50
Reading Access 10
Registered 2008-9-28
Status Offline
#3
Post at 2014-8-29 13:09
Profile
|
Blog
|
P.M.
|
实现换行,有何办法?
http://www.SoftYes.com
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#4
Post at 2014-8-29 14:42
Profile
|
Blog
|
P.M.
Label的换行,是自动换行,例子中把回车符换成空格的话也会换行。
Memo的换行则是字符串分了行。
Memo内部用TStrings来表示,而Label和CnButton使用Caption一个单一String来表示内容,所以CnButton达不到Memo的功能,只能模仿Label的自动换行。
我们最新的代码库中已经加入了CnButton的WordWrap属性,您可以查看、下载或测试。
https://github.com/cnpack
softyes
普通灌水员
UID 41023
Digest Posts
1
Credits 50
Posts 15
点点分 50
Reading Access 10
Registered 2008-9-28
Status Offline
#5
Post at 2014-9-1 10:54
Profile
|
Blog
|
P.M.
|
cnbitbtn 下载了新的,没发现属性wordwrap 增加个,#13换行即可
http://www.SoftYes.com
softyes
普通灌水员
UID 41023
Digest Posts
1
Credits 50
Posts 15
点点分 50
Reading Access 10
Registered 2008-9-28
Status Offline
#6
Post at 2014-9-1 11:11
Profile
|
Blog
|
P.M.
|
delphi原生的换行 wordwrap自动换行,回车也可换行
Button1.Caption:='测试'+ chr(13)+chr(10) + 'test' + chr(13)+chr(10) + 'ok';
CnBitBtn2.Caption
http://www.SoftYes.com
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#7
Post at 2014-9-1 15:16
Profile
|
Blog
|
P.M.
上个版本WordWrap属性未published出来,绘制时的Rect也未调整,现在已加上。git上再更新下来试一试?
softyes
普通灌水员
UID 41023
Digest Posts
1
Credits 50
Posts 15
点点分 50
Reading Access 10
Registered 2008-9-28
Status Offline
#8
Post at 2014-9-1 21:12
Profile
|
Blog
|
P.M.
|
delphi原生的换行 wordwrap自动换行,回车也可换行
Button1.Caption:='测试'+ chr(13)+chr(10) + 'test' + chr(13)+chr(10) + 'ok';
CnBitBtn2.Caption
有空增加个回车识别吧,英文字母自动换行,单词不完整,手工回车换行方便
http://www.SoftYes.com
softyes
普通灌水员
UID 41023
Digest Posts
1
Credits 50
Posts 15
点点分 50
Reading Access 10
Registered 2008-9-28
Status Offline
#9
Post at 2014-9-1 21:20
Profile
|
Blog
|
P.M.
|
git更新下,还是没有换行
http://www.SoftYes.com
softyes
普通灌水员
UID 41023
Digest Posts
1
Credits 50
Posts 15
点点分 50
Reading Access 10
Registered 2008-9-28
Status Offline
#10
Post at 2014-9-3 11:33
Profile
|
Blog
|
P.M.
|
现在可以换行了,谢谢!
多语言翻译正在研究测试中,没有想过用通用遍历所有文字,然后用互联网词汇
http://www.SoftYes.com
softyes
普通灌水员
UID 41023
Digest Posts
1
Credits 50
Posts 15
点点分 50
Reading Access 10
Registered 2008-9-28
Status Offline
#11
Post at 2014-12-1 15:23
Profile
|
Blog
|
P.M.
|
cnbutton 上个版本WordWrap属性未published出来,绘制时的Rect也未调整,现在已加上。git上再更新下来试一试?
git更新了,还是不能自动换行
http://www.SoftYes.com
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#12
Post at 2014-12-2 09:48
Profile
|
Blog
|
P.M.
楼上,九月份时不就能换行了吗?这段时间没改过它。
softyes
普通灌水员
UID 41023
Digest Posts
1
Credits 50
Posts 15
点点分 50
Reading Access 10
Registered 2008-9-28
Status Offline
#13
Post at 2014-12-11 10:15
Profile
|
Blog
|
P.M.
|
#13 回车换行可以,WordWrap属性 true 换行不行
http://www.SoftYes.com
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#14
Post at 2014-12-16 14:49
Profile
|
Blog
|
P.M.
我跟了一下,是我们计算RECT时给出的初始坐标有误,导致绘制时未能完成换行。目前git上已经修正此问题,麻烦下过最新版本来再试一试?
softyes
普通灌水员
UID 41023
Digest Posts
1
Credits 50
Posts 15
点点分 50
Reading Access 10
Registered 2008-9-28
Status Offline
#15
Post at 2014-12-17 21:37
Profile
|
Blog
|
P.M.
|
自动换行可以了,谢谢,遇到问题还得请教
http://www.SoftYes.com
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-12-4 17:09
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.008290 second(s), 7 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats