mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 20:26:13 +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
|
||||
inherited Create(AOwner);
|
||||
fCompStyle := csStaticText;
|
||||
FLayout := tlTop;
|
||||
fAlignment := taLeftJustify;
|
||||
FShowAccelChar:= true;
|
||||
ControlStyle := ControlStyle + [csOpaque, csReplicatable];
|
||||
@ -97,21 +96,6 @@ begin
|
||||
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
|
||||
Params: Val - new property value
|
||||
@ -187,6 +171,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$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
|
||||
swap TCustomStaticText and TCustomLabel
|
||||
|
||||
|
@ -196,7 +196,6 @@ type
|
||||
class function CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): HWND; override;
|
||||
class procedure SetAlignment(const ACustomStaticText: TCustomStaticText; const NewAlignment: TAlignment); override;
|
||||
class procedure SetLayout(const ACustomStaticText: TCustomStaticText; const NewLayout: TTextLayout); override;
|
||||
end;
|
||||
|
||||
{ TWin32WSStaticText }
|
||||
@ -893,11 +892,10 @@ end;
|
||||
|
||||
const
|
||||
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
|
||||
Result := AlignmentToStaticTextFlags[Alignment] or LayoutToStaticTextFlags[Layout];
|
||||
Result := AlignmentToStaticTextFlags[Alignment];
|
||||
end;
|
||||
|
||||
function TWin32WSCustomStaticText.CreateHandle(const AWinControl: TWinControl;
|
||||
@ -912,8 +910,7 @@ begin
|
||||
begin
|
||||
pClassName := 'STATIC';
|
||||
WindowTitle := StrCaption;
|
||||
Flags := Flags or CalcStaticTextFlags(
|
||||
TCustomStaticText(AWinControl).Alignment, TCustomStaticText(AWinControl).Layout);
|
||||
Flags := Flags or CalcStaticTextFlags(TCustomStaticText(AWinControl).Alignment);
|
||||
end;
|
||||
// create window
|
||||
FinishCreateWindow(AWinControl, Params, false);
|
||||
@ -926,13 +923,6 @@ begin
|
||||
TWin32WidgetSet(InterfaceObject).RecreateWnd(ACustomStaticText);
|
||||
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 }
|
||||
|
||||
function TWin32WSCustomCheckBox.CreateHandle(const AWinControl: TWinControl;
|
||||
|
@ -742,12 +742,10 @@ type
|
||||
TCustomStaticText = class(TWinControl)
|
||||
private
|
||||
FAlignment: TAlignment;
|
||||
FLayout: TTextLayout;
|
||||
FFocusControl: TWinControl;
|
||||
FShowAccelChar: boolean;
|
||||
FStaticBorderStyle: TStaticBorderStyle;
|
||||
procedure SetAlignment(Value: TAlignment);
|
||||
procedure SetLayout(Value: TTextLayout);
|
||||
procedure SetStaticBorderStyle(Value: TStaticBorderStyle);
|
||||
function GetStaticBorderStyle: TStaticBorderStyle;
|
||||
procedure WMActivate(var Message: TLMActivate); message LM_ACTIVATE;
|
||||
@ -766,7 +764,6 @@ type
|
||||
property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;
|
||||
property BorderStyle: TStaticBorderStyle read GetStaticBorderStyle write SetStaticBorderStyle;
|
||||
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;
|
||||
end;
|
||||
|
||||
@ -786,7 +783,6 @@ type
|
||||
property Constraints;
|
||||
property FocusControl;
|
||||
property Font;
|
||||
property Layout;
|
||||
property OnChangeBounds;
|
||||
property OnClick;
|
||||
property OnDblClick;
|
||||
@ -1216,6 +1212,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$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
|
||||
TCustomCheckBox.AllowGray defaults to false.
|
||||
|
||||
|
@ -156,7 +156,6 @@ type
|
||||
TWSCustomStaticTextClass = class of TWSCustomStaticText;
|
||||
TWSCustomStaticText = class(TWSWinControl)
|
||||
class procedure SetAlignment(const ACustomStaticText: TCustomStaticText; const NewAlignment: TAlignment); virtual;
|
||||
class procedure SetLayout(const ACustomStaticText: TCustomStaticText; const NewLayout: TTextLayout); virtual;
|
||||
end;
|
||||
|
||||
{ TWSStaticText }
|
||||
@ -375,10 +374,6 @@ procedure TWSCustomStaticText.SetAlignment(const ACustomStaticText: TCustomStati
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TWSCustomStaticText.SetLayout(const ACustomStaticText: TCustomStaticText; const NewLayout: TTextLayout);
|
||||
begin
|
||||
end;
|
||||
|
||||
{ TWSCustomCheckBox }
|
||||
|
||||
function TWSCustomCheckBox.RetrieveState(const ACustomCheckBox: TCustomCheckBox): TCheckBoxState;
|
||||
|
Loading…
Reference in New Issue
Block a user