关于Scrollbar组件里的onscroll事件的用法,它里面的参数怎么用?

javahou 2004-11-27 09:59:46
请祥解!!
...全文
545 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
flyliyang 2005-05-21
  • 打赏
  • 举报
回复
scLineUp
User clicked the top or left scroll arrow or pressed the Up or Left arrow key.
scLineDown
User clicked the bottom or right scroll arrow or pressed the Down or Right arrow key.
scPageUp
User clicked the area to the left of the thumb tab or pressed the PgUp key.
scPageDown
User clicked the area to the right of the thumb tab or pressed the PgDn key.
scPosition
User positioned the thumb tab and released it.
scTrack
User is moving the thumb tab.
scTop
User moved the thumb tab to the top or far left on the scroll bar.

scBottom
User moved the thumb tab to the bottom or far right on the scroll bar.
scEndScroll
User finished moving the thumb tab on the scroll bar
flyliyang 2005-05-21
  • 打赏
  • 举报
回复
case TScrollCode(ScrollCode) of
scPosition :
begin
///...//// 定位滑块位置,并放开鼠标按键
end;
scTrack :
begin
//////// 滑块时
end;
scLineUp :
begin
//////点左边(上边)的按钮时
end;
scLineDown :
begin
/////点下边的按钮时
end ;
scPageUp :
begin
////上翻页时
end;
scPageDown :
begin
////下翻页时
end;
scTop :
begin
////滑块移动到左边(上面)时;
end;
scBottom :
begin
/////滑块移动到右边(下面)时;
end;
scEndScroll :
begin
////停止滑动时
end;
end;
hyongk 2004-12-08
  • 打赏
  • 举报
回复
不错
iamcfr 2004-11-27
  • 打赏
  • 举报
回复
一个新开的商业源码站点,大家支持一下
有ERP源码和文档
http://www.czrx.com/get.asp?get=iamcfr
haiziya2004 2004-11-27
  • 打赏
  • 举报
回复
再问一个简单的问题,一般控件自带的AutoScoll属性,只能控制控件往下往右滚动,
可是如何使他也能往左滚动呢!!
nyf1220 2004-11-27
  • 打赏
  • 举报
回复
至于参数,,帮助里很详细了
nyf1220 2004-11-27
  • 打赏
  • 举报
回复
帮助里不是有例子吗 ?
procedure TForm1.FormCreate(Sender: TObject);

var
I : Integer;

begin

{ First, initialize the page control }
PageControl1.TabWidth := PageControl1.ClientWidth div 4 - 1;

PageControl1.ActivePage := PageControl1.Pages[0];

{ set up the scrollbar to reflect the structure of the page control}
with ScrollBar1 do
begin
Max := PageControl1.PageCount - 1;
Min := 0;
SmallChange := 1;
{ set LargeChange to a single row of tabs }
LargeChange := PageControl1.ClientWidth div PageControl1.TabWidth;
end;

end;

procedure TForm1.PageControl1Change(Sender: TObject);

begin
with Sender as TPageControl do
ScrollBar1.Position := ActivePage.PageIndex;

end;

procedure TForm1.ScrollBar1Scroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer);

begin
PageControl1.ActivePage := PageControl1.Pages[ScrollPos];
end;

5,392

社区成员

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

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