Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to create a scrollbox that lets you disable automatic scrolling Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
15-Aug-03
Category
VCL-General
Language
Delphi 2.x
Views
150
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas 

How to create a scrollbox that lets you disable automatic scrolling

Answer:

1   unit MyScrollBox;
2   
3   interface
4   
5   uses
6     SysUtils, Classes, Controls, Forms;
7   
8   type
9     TMyScrollBox = class(TScrollBox)
10    private
11      FEnableScrollInView: Boolean;
12    protected
13      procedure AutoScrollInView(AControl: TControl); override;
14    public
15      constructor Create(AOwner: TComponent); override;
16    published
17      property EnableScrollInView: Boolean read FEnableScrollInView
18        write FEnableScrollInView default True;
19    end;
20  
21  procedure register;
22  
23  implementation
24  
25  procedure register;
26  begin
27    RegisterComponents('Samples', [TMyScrollBox]);
28  end;
29  
30  procedure TMyScrollBox.AutoScrollInView(AControl: TControl);
31  begin
32    if FEnableScrollInView then
33      inherited AutoScrollInView(AControl);
34  end;
35  
36  constructor TMyScrollBox.Create(AOwner: TComponent);
37  begin
38    inherited Create(AOwner);
39    FEnableScrollInView := True;
40  end;
41  
42  end.


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC