mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 10:55:56 +02:00
lcl: don't publish TRadioButton State and AllowGrayed properties: Delphi compatible.
separate TCustomCheckBox/TCheckBox constructors to avoid double setting of AutoSize/TabStop in TToggleBox/TRadioButton git-svn-id: trunk@27055 -
This commit is contained in:
parent
e50914e4bf
commit
4a9091c3a2
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -4455,6 +4455,7 @@ lcl/include/buttoncontrol.inc svneol=native#text/pascal
|
|||||||
lcl/include/buttonglyph.inc svneol=native#text/pascal
|
lcl/include/buttonglyph.inc svneol=native#text/pascal
|
||||||
lcl/include/buttons.inc svneol=native#text/pascal
|
lcl/include/buttons.inc svneol=native#text/pascal
|
||||||
lcl/include/canvas.inc svneol=native#text/pascal
|
lcl/include/canvas.inc svneol=native#text/pascal
|
||||||
|
lcl/include/checkbox.inc svneol=native#text/pascal
|
||||||
lcl/include/clipbrd.inc svneol=native#text/pascal
|
lcl/include/clipbrd.inc svneol=native#text/pascal
|
||||||
lcl/include/colorbutton.inc svneol=native#text/pascal
|
lcl/include/colorbutton.inc svneol=native#text/pascal
|
||||||
lcl/include/colordialog.inc svneol=native#text/pascal
|
lcl/include/colordialog.inc svneol=native#text/pascal
|
||||||
|
33
lcl/include/checkbox.inc
Normal file
33
lcl/include/checkbox.inc
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{%MainUnit ../stdctrls.pp}
|
||||||
|
|
||||||
|
{******************************************************************************
|
||||||
|
checkbox.inc
|
||||||
|
******************************************************************************
|
||||||
|
|
||||||
|
*****************************************************************************
|
||||||
|
* *
|
||||||
|
* This file is part of the Lazarus Component Library (LCL) *
|
||||||
|
* *
|
||||||
|
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
|
||||||
|
* for details about the copyright. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* *
|
||||||
|
*****************************************************************************
|
||||||
|
}
|
||||||
|
|
||||||
|
// included by stdctrls.pp
|
||||||
|
|
||||||
|
{ TCheckBox }
|
||||||
|
|
||||||
|
constructor TCheckBox.Create(TheOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(TheOwner);
|
||||||
|
fCompStyle := csCheckbox;
|
||||||
|
TabStop := True;
|
||||||
|
AutoSize := True;
|
||||||
|
//FState := cbUnchecked;
|
||||||
|
//FAllowGrayed := false;
|
||||||
|
end;
|
@ -92,13 +92,9 @@ end;
|
|||||||
constructor TCustomCheckBox.Create(TheOwner: TComponent);
|
constructor TCustomCheckBox.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
fCompStyle := csCheckbox;
|
//todo: move to TButtonControl
|
||||||
FState := cbUnchecked;
|
|
||||||
FAllowGrayed := false;
|
|
||||||
TabStop := true;
|
|
||||||
with GetControlClassDefaultSize do
|
with GetControlClassDefaultSize do
|
||||||
SetInitialBounds(0, 0, CX, CY);
|
SetInitialBounds(0, 0, CX, CY);
|
||||||
AutoSize := true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
@ -53,6 +53,7 @@ constructor TRadioButton.Create(TheOwner : TComponent);
|
|||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
fCompStyle := csRadioButton;
|
fCompStyle := csRadioButton;
|
||||||
|
AutoSize := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -93,6 +94,8 @@ class procedure TRadioButton.WSRegisterClass;
|
|||||||
begin
|
begin
|
||||||
inherited WSRegisterClass;
|
inherited WSRegisterClass;
|
||||||
RegisterRadioButton;
|
RegisterRadioButton;
|
||||||
|
RegisterPropertyToSkip(TRadioButton, 'State', 'Removed in 0.9.29. It should not be allowed to set the State directly', '');
|
||||||
|
RegisterPropertyToSkip(TRadioButton, 'AllowGrayed', 'Removed in 0.9.29. Grayed state is not supported by TRadioButton', '');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRadioButton.DialogChar(var Message: TLMKey): boolean;
|
function TRadioButton.DialogChar(var Message: TLMKey): boolean;
|
||||||
|
@ -32,7 +32,7 @@ constructor TToggleBox.Create(TheOwner : TComponent);
|
|||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
fCompStyle := csToggleBox;
|
fCompStyle := csToggleBox;
|
||||||
AutoSize := False;
|
TabStop := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
|
@ -1204,10 +1204,8 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
public
|
public
|
||||||
property AutoSize default true;
|
|
||||||
property AllowGrayed: Boolean read FAllowGrayed write FAllowGrayed default false;
|
property AllowGrayed: Boolean read FAllowGrayed write FAllowGrayed default false;
|
||||||
property State: TCheckBoxState read GetState write SetState default cbUnchecked;
|
property State: TCheckBoxState read GetState write SetState default cbUnchecked;
|
||||||
property TabStop default true;
|
|
||||||
property OnChange;
|
property OnChange;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1216,12 +1214,14 @@ type
|
|||||||
{ TCheckBox }
|
{ TCheckBox }
|
||||||
|
|
||||||
TCheckBox = class(TCustomCheckBox)
|
TCheckBox = class(TCustomCheckBox)
|
||||||
|
public
|
||||||
|
constructor Create(TheOwner: TComponent); override;
|
||||||
published
|
published
|
||||||
property Action;
|
property Action;
|
||||||
property Align;
|
property Align;
|
||||||
property AllowGrayed;
|
property AllowGrayed;
|
||||||
property Anchors;
|
property Anchors;
|
||||||
property AutoSize;
|
property AutoSize default True;
|
||||||
property BidiMode;
|
property BidiMode;
|
||||||
property BorderSpacing;
|
property BorderSpacing;
|
||||||
property Caption;
|
property Caption;
|
||||||
@ -1263,7 +1263,7 @@ type
|
|||||||
property ShowHint;
|
property ShowHint;
|
||||||
property State;
|
property State;
|
||||||
property TabOrder;
|
property TabOrder;
|
||||||
property TabStop;
|
property TabStop default True;
|
||||||
property Visible;
|
property Visible;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1278,7 +1278,7 @@ type
|
|||||||
published
|
published
|
||||||
property AllowGrayed;
|
property AllowGrayed;
|
||||||
property Anchors;
|
property Anchors;
|
||||||
property AutoSize default false;
|
property AutoSize;
|
||||||
property BorderSpacing;
|
property BorderSpacing;
|
||||||
property Caption;
|
property Caption;
|
||||||
property Checked;
|
property Checked;
|
||||||
@ -1305,7 +1305,7 @@ type
|
|||||||
property ShowHint;
|
property ShowHint;
|
||||||
property State;
|
property State;
|
||||||
property TabOrder;
|
property TabOrder;
|
||||||
property TabStop;
|
property TabStop default True;
|
||||||
property Visible;
|
property Visible;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1323,9 +1323,8 @@ type
|
|||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
published
|
published
|
||||||
property Align;
|
property Align;
|
||||||
property AllowGrayed;
|
|
||||||
property Anchors;
|
property Anchors;
|
||||||
property AutoSize;
|
property AutoSize default True;
|
||||||
property BidiMode;
|
property BidiMode;
|
||||||
property BorderSpacing;
|
property BorderSpacing;
|
||||||
property Caption;
|
property Caption;
|
||||||
@ -1363,9 +1362,8 @@ type
|
|||||||
property ParentShowHint;
|
property ParentShowHint;
|
||||||
property PopupMenu;
|
property PopupMenu;
|
||||||
property ShowHint;
|
property ShowHint;
|
||||||
property State;
|
|
||||||
property TabOrder;
|
property TabOrder;
|
||||||
property TabStop;
|
property TabStop default False;
|
||||||
property Visible;
|
property Visible;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1564,6 +1562,7 @@ end;
|
|||||||
{$I buttoncontrol.inc}
|
{$I buttoncontrol.inc}
|
||||||
{$I buttons.inc}
|
{$I buttons.inc}
|
||||||
|
|
||||||
|
{$I checkbox.inc}
|
||||||
{$I radiobutton.inc}
|
{$I radiobutton.inc}
|
||||||
{$I togglebox.inc}
|
{$I togglebox.inc}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user