lcl: set default value for TScrollBox.BorderStyle to bsSingle

win32, wince: handle TScrollBox.BorderStyle on window creation
(issue #0013346)

git-svn-id: trunk@19023 -
This commit is contained in:
paul 2009-03-18 10:48:43 +00:00
parent c6c378afb6
commit 5c9f7efdf3
4 changed files with 9 additions and 6 deletions

View File

@ -195,7 +195,7 @@ type
property AutoScroll; property AutoScroll;
property BorderSpacing; property BorderSpacing;
property BiDiMode; property BiDiMode;
property BorderStyle; property BorderStyle default bsSingle;
property ChildSizing; property ChildSizing;
property ClientHeight; property ClientHeight;
property ClientWidth; property ClientWidth;

View File

@ -5,7 +5,7 @@
* * * *
* This file is part of the Lazarus Component Library (LCL) * * This file is part of the Lazarus Component Library (LCL) *
* * * *
* See the file COPYING.modifiedLGPL.txt, included in this distribution, * * See the file COPYING.modifiedLGPL.txt, included in this distribution, *
* for details about the copyright. * * for details about the copyright. *
* * * *
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
@ -19,6 +19,7 @@ constructor TScrollBox.Create(AOwner: TComponent);
begin begin
Inherited Create(AOwner); Inherited Create(AOwner);
fCompStyle:= csScrollBox; fCompStyle:= csScrollBox;
BorderStyle := bsSingle;
end; end;
// included by forms.pp // included by forms.pp

View File

@ -52,7 +52,7 @@ type
TWin32WSScrollBox = class(TWSScrollBox) TWin32WSScrollBox = class(TWSScrollBox)
published published
class function CreateHandle(const AWinControl: TWinControl; class function CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND; override; const AParams: TCreateParams): HWND; override;
end; end;
@ -196,7 +196,8 @@ begin
with Params do with Params do
begin begin
//TODO: Make control respond to user scroll request //TODO: Make control respond to user scroll request
FlagsEx := FlagsEx or WS_EX_CLIENTEDGE; if TScrollBox(AWinControl).BorderStyle = bsSingle then
FlagsEx := FlagsEx or WS_EX_CLIENTEDGE;
pClassName := @ClsName[0]; pClassName := @ClsName[0];
Flags := Flags or WS_HSCROLL or WS_VSCROLL; Flags := Flags or WS_HSCROLL or WS_VSCROLL;
SubClassWndProc := nil; SubClassWndProc := nil;

View File

@ -48,7 +48,7 @@ type
TWinCEWSScrollBox = class(TWSScrollBox) TWinCEWSScrollBox = class(TWSScrollBox)
published published
class function CreateHandle(const AWinControl: TWinControl; class function CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND; override; const AParams: TCreateParams): HWND; override;
end; end;
@ -135,7 +135,8 @@ begin
with Params do with Params do
begin begin
//TODO: Make control respond to user scroll request //TODO: Make control respond to user scroll request
FlagsEx := FlagsEx or WS_EX_CLIENTEDGE; if TScrollBox(AWinControl).BorderStyle = bsSingle then
FlagsEx := FlagsEx or WS_EX_CLIENTEDGE;
pClassName := @ClsName; pClassName := @ClsName;
Flags := Flags or WS_HSCROLL or WS_VSCROLL; Flags := Flags or WS_HSCROLL or WS_VSCROLL;
SubClassWndProc := nil; SubClassWndProc := nil;