Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnVCL 组件包
» 请教:CnAAScrollText控件能不能只滚动一次,停在文本尾部,而现有的会自动回滚到头部停下。
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: 请教:CnAAScrollText控件能不能只滚动一次,停在文本尾部,而现有的会自动回滚到头部停下。
天堂游子
新警察
UID 47616
Digest Posts 0
Credits 20
Posts 7
点点分 20
Reading Access 10
Registered 2010-5-4
Status Offline
#1
Post at 2010-5-6 13:32
Profile
|
Blog
|
P.M.
请教:CnAAScrollText控件能不能只滚动一次,停在文本尾部,而现有的会自动回滚到头部停下。
请教:CnAAScrollText控件能不能只滚动一次,停在文本尾部,而现有的会自动回滚到头部停下。
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 2010-5-6 16:35
Profile
|
Site
|
Blog
|
P.M.
有一个 RepeatCount 属性可以控制循环次数,设置为 1 就只滚动一次。
Zhou JingYu
CnPack Administrator
http://www.cnpack.org/
天堂游子
新警察
UID 47616
Digest Posts 0
Credits 20
Posts 7
点点分 20
Reading Access 10
Registered 2010-5-4
Status Offline
#3
Post at 2010-5-10 11:05
Profile
|
Blog
|
P.M.
QUOTE:
原帖由
zjy
于 2010-5-6 16:35 发表
有一个 RepeatCount 属性可以控制循环次数,设置为 1 就只滚动一次。
这个我知道的,但它会回滚到头部,我是想它滚动到底部就停止!
zjy
管理员
UID 2
Digest Posts
6
Credits 2385
Posts 1543
点点分 2385
Reading Access 102
Registered 2002-12-16
Location China
Status Offline
#4
Post at 2010-5-11 10:19
Profile
|
Site
|
Blog
|
P.M.
可以修改 TCnAAScrollText.OnScrollTimer 函数
这里面是通过判断 CurrPos 的位置来决定一次循环结束的:
if (FScrollStep > 0) and (CurrPos + FScrollStep >= TextBmp.Height) then
CurrPos := 0
从理论上讲,如果要支持循环滚动,也应该是这样。
不过如果你的需求是只滚动到底就停止,可以把条件改改,关键条件改成:
判断 CurrPos + FScrollStep + Height >= TextBmp.Height // 当前位置加滚动量加控件高度
Zhou JingYu
CnPack Administrator
http://www.cnpack.org/
天堂游子
新警察
UID 47616
Digest Posts 0
Credits 20
Posts 7
点点分 20
Reading Access 10
Registered 2010-5-4
Status Offline
#5
Post at 2010-5-12 11:32
Profile
|
Blog
|
P.M.
太感谢啦!
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-27 11:20
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.008453 second(s), 9 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