LCL: TScrollingWinControl.AutoScroll (bug #10774)

* moved TScrollingWinControl.AutoScroll from published to protected section
* set default value to true
* published AutoScroll in descendant classes

git-svn-id: trunk@15375 -
This commit is contained in:
vincents 2008-06-10 14:30:57 +00:00
parent ad8b434a14
commit d99a049461
2 changed files with 4 additions and 2 deletions

View File

@ -153,6 +153,7 @@ type
procedure SetVertScrollBar(Value: TControlScrollBar); procedure SetVertScrollBar(Value: TControlScrollBar);
function StoreScrollBars : Boolean; function StoreScrollBars : Boolean;
protected protected
property AutoScroll: Boolean read FAutoScroll write SetAutoScroll default true;
procedure AlignControls(AControl: TControl; var ARect: TRect); override; procedure AlignControls(AControl: TControl; var ARect: TRect); override;
procedure CreateWnd; override; procedure CreateWnd; override;
function GetClientScrollOffset: TPoint; override; function GetClientScrollOffset: TPoint; override;
@ -172,7 +173,6 @@ type
procedure UpdateScrollbars; procedure UpdateScrollbars;
function HasVisibleScrollbars: boolean; virtual; function HasVisibleScrollbars: boolean; virtual;
published published
property AutoScroll: Boolean read FAutoScroll write SetAutoScroll;
property HorzScrollBar: TControlScrollBar property HorzScrollBar: TControlScrollBar
read FHorzScrollBar write SetHorzScrollBar stored StoreScrollBars; read FHorzScrollBar write SetHorzScrollBar stored StoreScrollBars;
property VertScrollBar: TControlScrollBar property VertScrollBar: TControlScrollBar
@ -189,7 +189,7 @@ type
property Align; property Align;
property Anchors; property Anchors;
property AutoSize; property AutoSize;
//property AutoScroll; property AutoScroll;
property BorderSpacing; property BorderSpacing;
property BiDiMode; property BiDiMode;
property BorderStyle; property BorderStyle;
@ -608,6 +608,7 @@ type
property ActiveControl; property ActiveControl;
property Align; property Align;
property AllowDropFiles; property AllowDropFiles;
property AutoScroll;
property AutoSize; property AutoSize;
property BiDiMode; property BiDiMode;
property BorderIcons; property BorderIcons;

View File

@ -233,6 +233,7 @@ constructor TScrollingWinControl.Create(TheOwner : TComponent);
begin begin
Inherited Create(TheOwner); Inherited Create(TheOwner);
FAutoScroll := true;
FVertScrollbar := TControlScrollBar.Create(Self, sbVertical); FVertScrollbar := TControlScrollBar.Create(Self, sbVertical);
FHorzScrollbar := TControlScrollBar.Create(Self, sbHorizontal); FHorzScrollbar := TControlScrollBar.Create(Self, sbHorizontal);