Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnVCL 组件包
» CNAAScrollText控件中文字换行位置的计算有BUG
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: CNAAScrollText控件中文字换行位置的计算有BUG
流年似水
新警察
UID 67728
Digest Posts 0
Credits 10
Posts 3
点点分 10
Reading Access 10
Registered 2012-11-2
Status Offline
#1
Post at 2012-11-2 23:09
Profile
|
Blog
|
P.M.
CNAAScrollText控件中文字换行位置的计算有BUG
您好,很感谢您提供的组件。
我在使用CNAAScrollText控件时,感觉文字换行的位置计算不正确。
如附件图片。
我设置的控件的宽度是192,应该能正好显示开12个中文字符,但是始终只显示11个,
当把控件的宽度设置为200时,才会显示12个字符,这显然不正确。
我也看了一下源代码,但不晓得从哪里可以修改,希望能修复此BUG或者指点一二我来修改,不胜感激。
Image Attachment
:
QQ截图20121102230516.png
(2012-11-2 23:09, 5.09 K)
zjy
管理员
UID 2
Digest Posts
6
Credits 2385
Posts 1543
点点分 2385
Reading Access 102
Registered 2002-12-16
Location China
Status Offline
#2
Post at 2012-11-3 16:02
Profile
|
Site
|
Blog
|
P.M.
确实是个Bug
您可以自己修改一下:
CnAAFont.pas 文件第3955行,将原来的:
if Col >= MaxCol - 1 then
修改为:
if Col >= MaxCol then
应该就行了,一会我会在SVN上做个更新。
Zhou JingYu
CnPack Administrator
http://www.cnpack.org/
流年似水
新警察
UID 67728
Digest Posts 0
Credits 10
Posts 3
点点分 10
Reading Access 10
Registered 2012-11-2
Status Offline
#3
Post at 2012-11-6 22:02
Profile
|
Blog
|
P.M.
非常感谢回复。
您说的这段代码我自己也尝试修改过,修改后的效果如图所示。
中文换行显示没问题了,但是遇到英文或者数字的时候,会有最后一个字母或者数字显示不正常。
希望能给出解决办法。谢谢。
Image Attachment
:
QQ截图20121106215937.png
(2012-11-6 22:02, 4.95 K)
delphi
新警察
UID 41130
Digest Posts 0
Credits 39
Posts 17
点点分 39
Reading Access 10
Registered 2008-10-21
Status Offline
#4
Post at 2012-11-12 15:30
Profile
|
Blog
|
P.M.
中文占两个字符,英文占一个字符,那样改显然不合适
流年似水
新警察
UID 67728
Digest Posts 0
Credits 10
Posts 3
点点分 10
Reading Access 10
Registered 2012-11-2
Status Offline
#5
Post at 2012-11-19 12:45
Profile
|
Blog
|
P.M.
回复 #4 delphi 的帖子
要怎么修改呢?
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-11-22 06:53
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.009445 second(s), 10 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