mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 10:36:00 +02:00
remove TStaticText.Layout property, not supported by delphi, hard to implement
git-svn-id: trunk@6549 -
This commit is contained in:
parent
bde1444b74
commit
d1ef6f2b88
@ -29,7 +29,6 @@ constructor TCustomStaticText.Create(AOwner: TComponent);
|
|||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
fCompStyle := csStaticText;
|
fCompStyle := csStaticText;
|
||||||
FLayout := tlTop;
|
|
||||||
fAlignment := taLeftJustify;
|
fAlignment := taLeftJustify;
|
||||||
FShowAccelChar:= true;
|
FShowAccelChar:= true;
|
||||||
ControlStyle := ControlStyle + [csOpaque, csReplicatable];
|
ControlStyle := ControlStyle + [csOpaque, csReplicatable];
|
||||||
@ -97,21 +96,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
|
||||||
Method: TCustomStaticText.SetLayout
|
|
||||||
Params: None
|
|
||||||
Returns: Nothing
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------}
|
|
||||||
procedure TCustomStaticText.SetLayout(Value: TTextLayout);
|
|
||||||
begin
|
|
||||||
if FLayout <> Value then begin
|
|
||||||
FLayout:= Value;
|
|
||||||
if HandleAllocated then
|
|
||||||
TWSCustomStaticTextClass(WidgetSetClass).SetLayout(Self, Value);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomStaticText.SetShowAccelChar
|
Method: TCustomStaticText.SetShowAccelChar
|
||||||
Params: Val - new property value
|
Params: Val - new property value
|
||||||
@ -187,6 +171,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.11 2005/01/11 21:36:36 micha
|
||||||
|
remove TStaticText.Layout property, not supported by delphi, hard to implement
|
||||||
|
|
||||||
Revision 1.10 2005/01/07 20:51:11 micha
|
Revision 1.10 2005/01/07 20:51:11 micha
|
||||||
swap TCustomStaticText and TCustomLabel
|
swap TCustomStaticText and TCustomLabel
|
||||||
|
|
||||||
|
@ -196,7 +196,6 @@ type
|
|||||||
class function CreateHandle(const AWinControl: TWinControl;
|
class function CreateHandle(const AWinControl: TWinControl;
|
||||||
const AParams: TCreateParams): HWND; override;
|
const AParams: TCreateParams): HWND; override;
|
||||||
class procedure SetAlignment(const ACustomStaticText: TCustomStaticText; const NewAlignment: TAlignment); override;
|
class procedure SetAlignment(const ACustomStaticText: TCustomStaticText; const NewAlignment: TAlignment); override;
|
||||||
class procedure SetLayout(const ACustomStaticText: TCustomStaticText; const NewLayout: TTextLayout); override;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWin32WSStaticText }
|
{ TWin32WSStaticText }
|
||||||
@ -893,11 +892,10 @@ end;
|
|||||||
|
|
||||||
const
|
const
|
||||||
AlignmentToStaticTextFlags: array[TAlignment] of dword = (SS_LEFT, SS_RIGHT, SS_CENTER);
|
AlignmentToStaticTextFlags: array[TAlignment] of dword = (SS_LEFT, SS_RIGHT, SS_CENTER);
|
||||||
LayoutToStaticTextFlags: array[TTextLayout] of dword = (0,0,0) {(SS_TOP, SS_VCENTER, SS_BOTTOM)};
|
|
||||||
|
|
||||||
function CalcStaticTextFlags(const Alignment: TAlignment; const Layout: TTextLayout): dword;
|
function CalcStaticTextFlags(const Alignment: TAlignment): dword;
|
||||||
begin
|
begin
|
||||||
Result := AlignmentToStaticTextFlags[Alignment] or LayoutToStaticTextFlags[Layout];
|
Result := AlignmentToStaticTextFlags[Alignment];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TWin32WSCustomStaticText.CreateHandle(const AWinControl: TWinControl;
|
function TWin32WSCustomStaticText.CreateHandle(const AWinControl: TWinControl;
|
||||||
@ -912,8 +910,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
pClassName := 'STATIC';
|
pClassName := 'STATIC';
|
||||||
WindowTitle := StrCaption;
|
WindowTitle := StrCaption;
|
||||||
Flags := Flags or CalcStaticTextFlags(
|
Flags := Flags or CalcStaticTextFlags(TCustomStaticText(AWinControl).Alignment);
|
||||||
TCustomStaticText(AWinControl).Alignment, TCustomStaticText(AWinControl).Layout);
|
|
||||||
end;
|
end;
|
||||||
// create window
|
// create window
|
||||||
FinishCreateWindow(AWinControl, Params, false);
|
FinishCreateWindow(AWinControl, Params, false);
|
||||||
@ -926,13 +923,6 @@ begin
|
|||||||
TWin32WidgetSet(InterfaceObject).RecreateWnd(ACustomStaticText);
|
TWin32WidgetSet(InterfaceObject).RecreateWnd(ACustomStaticText);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TWin32WSCustomStaticText.SetLayout(const ACustomStaticText: TCustomStaticText; const NewLayout: TTextLayout);
|
|
||||||
begin
|
|
||||||
// TODO
|
|
||||||
UpdateWindowStyle(ACustomStaticText.Handle,
|
|
||||||
LayoutToStaticTextFlags[NewLayout], 0 {SS_TOP or SS_VCENTER or SS_BOTTOM});
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TWin32WSCustomCheckBox }
|
{ TWin32WSCustomCheckBox }
|
||||||
|
|
||||||
function TWin32WSCustomCheckBox.CreateHandle(const AWinControl: TWinControl;
|
function TWin32WSCustomCheckBox.CreateHandle(const AWinControl: TWinControl;
|
||||||
|
@ -742,12 +742,10 @@ type
|
|||||||
TCustomStaticText = class(TWinControl)
|
TCustomStaticText = class(TWinControl)
|
||||||
private
|
private
|
||||||
FAlignment: TAlignment;
|
FAlignment: TAlignment;
|
||||||
FLayout: TTextLayout;
|
|
||||||
FFocusControl: TWinControl;
|
FFocusControl: TWinControl;
|
||||||
FShowAccelChar: boolean;
|
FShowAccelChar: boolean;
|
||||||
FStaticBorderStyle: TStaticBorderStyle;
|
FStaticBorderStyle: TStaticBorderStyle;
|
||||||
procedure SetAlignment(Value: TAlignment);
|
procedure SetAlignment(Value: TAlignment);
|
||||||
procedure SetLayout(Value: TTextLayout);
|
|
||||||
procedure SetStaticBorderStyle(Value: TStaticBorderStyle);
|
procedure SetStaticBorderStyle(Value: TStaticBorderStyle);
|
||||||
function GetStaticBorderStyle: TStaticBorderStyle;
|
function GetStaticBorderStyle: TStaticBorderStyle;
|
||||||
procedure WMActivate(var Message: TLMActivate); message LM_ACTIVATE;
|
procedure WMActivate(var Message: TLMActivate); message LM_ACTIVATE;
|
||||||
@ -766,7 +764,6 @@ type
|
|||||||
property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;
|
property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;
|
||||||
property BorderStyle: TStaticBorderStyle read GetStaticBorderStyle write SetStaticBorderStyle;
|
property BorderStyle: TStaticBorderStyle read GetStaticBorderStyle write SetStaticBorderStyle;
|
||||||
property FocusControl: TWinControl read FFocusControl write SetFocusControl;
|
property FocusControl: TWinControl read FFocusControl write SetFocusControl;
|
||||||
property Layout: TTextLayout read FLayout write SetLayout default tlTop;
|
|
||||||
property ShowAccelChar: boolean read FShowAccelChar write SetShowAccelChar default true;
|
property ShowAccelChar: boolean read FShowAccelChar write SetShowAccelChar default true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -786,7 +783,6 @@ type
|
|||||||
property Constraints;
|
property Constraints;
|
||||||
property FocusControl;
|
property FocusControl;
|
||||||
property Font;
|
property Font;
|
||||||
property Layout;
|
|
||||||
property OnChangeBounds;
|
property OnChangeBounds;
|
||||||
property OnClick;
|
property OnClick;
|
||||||
property OnDblClick;
|
property OnDblClick;
|
||||||
@ -1216,6 +1212,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.183 2005/01/11 21:36:36 micha
|
||||||
|
remove TStaticText.Layout property, not supported by delphi, hard to implement
|
||||||
|
|
||||||
Revision 1.182 2005/01/11 13:25:23 vincents
|
Revision 1.182 2005/01/11 13:25:23 vincents
|
||||||
TCustomCheckBox.AllowGray defaults to false.
|
TCustomCheckBox.AllowGray defaults to false.
|
||||||
|
|
||||||
|
@ -156,7 +156,6 @@ type
|
|||||||
TWSCustomStaticTextClass = class of TWSCustomStaticText;
|
TWSCustomStaticTextClass = class of TWSCustomStaticText;
|
||||||
TWSCustomStaticText = class(TWSWinControl)
|
TWSCustomStaticText = class(TWSWinControl)
|
||||||
class procedure SetAlignment(const ACustomStaticText: TCustomStaticText; const NewAlignment: TAlignment); virtual;
|
class procedure SetAlignment(const ACustomStaticText: TCustomStaticText; const NewAlignment: TAlignment); virtual;
|
||||||
class procedure SetLayout(const ACustomStaticText: TCustomStaticText; const NewLayout: TTextLayout); virtual;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWSStaticText }
|
{ TWSStaticText }
|
||||||
@ -375,10 +374,6 @@ procedure TWSCustomStaticText.SetAlignment(const ACustomStaticText: TCustomStati
|
|||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TWSCustomStaticText.SetLayout(const ACustomStaticText: TCustomStaticText; const NewLayout: TTextLayout);
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TWSCustomCheckBox }
|
{ TWSCustomCheckBox }
|
||||||
|
|
||||||
function TWSCustomCheckBox.RetrieveState(const ACustomCheckBox: TCustomCheckBox): TCheckBoxState;
|
function TWSCustomCheckBox.RetrieveState(const ACustomCheckBox: TCustomCheckBox): TCheckBoxState;
|
||||||
|
Loading…
Reference in New Issue
Block a user