mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 12:39:29 +02:00
LCL, changing AllowGrayed at runtime has no effect (windows), fixed
git-svn-id: trunk@19892 -
This commit is contained in:
parent
c688af0189
commit
a849d36c9a
@ -38,6 +38,15 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomCheckBox.SetAllowGrayed(const AValue: Boolean);
|
||||
begin
|
||||
if AValue<>FAllowGrayed then begin
|
||||
FAllowGrayed := AValue;
|
||||
if HandleAllocated then
|
||||
TWSCustomCheckBoxClass(WidgetSetClass).AllowGrayedChanged(Self);
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCustomCheckBox.GetState
|
||||
Params: none
|
||||
|
@ -257,6 +257,7 @@ type
|
||||
class procedure SetBiDiMode(const AWinControl: TWinControl; UseRightToLeftAlign,
|
||||
UseRightToLeftReading, UseRightToLeftScrollBar : Boolean); override;
|
||||
class procedure SetState(const ACustomCheckBox: TCustomCheckBox; const NewState: TCheckBoxState); override;
|
||||
class procedure AllowGrayedChanged(const ACustomCheckbox: TCustomCheckbox); override;
|
||||
end;
|
||||
|
||||
{ TWin32WSCheckBox }
|
||||
@ -1537,6 +1538,12 @@ begin
|
||||
Windows.SendMessage(ACustomCheckBox.Handle, BM_SETCHECK, Flags, 0);
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomCheckBox.AllowGrayedChanged(
|
||||
const ACustomCheckbox: TCustomCheckbox);
|
||||
begin
|
||||
RecreateWnd(ACustomCheckbox);
|
||||
end;
|
||||
|
||||
{ TWin32WSToggleBox }
|
||||
|
||||
class function TWin32WSToggleBox.CreateHandle(const AWinControl: TWinControl;
|
||||
|
@ -1165,6 +1165,7 @@ type
|
||||
FAllowGrayed: Boolean;
|
||||
FState: TCheckBoxState;
|
||||
FShortCut: TShortcut;
|
||||
procedure SetAllowGrayed(const AValue: Boolean);
|
||||
procedure SetState(Value: TCheckBoxState);
|
||||
function GetState: TCheckBoxState;
|
||||
procedure DoChange(var Msg); message LM_CHANGED;
|
||||
@ -1187,7 +1188,7 @@ type
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
public
|
||||
property AutoSize default true;
|
||||
property AllowGrayed: Boolean read FAllowGrayed write FAllowGrayed default false;
|
||||
property AllowGrayed: Boolean read FAllowGrayed write SetAllowGrayed default false;
|
||||
property State: TCheckBoxState read GetState write SetState default cbUnchecked;
|
||||
property TabStop default true;
|
||||
property OnChange;
|
||||
|
@ -222,6 +222,7 @@ type
|
||||
class procedure SetShortCut(const ACustomCheckBox: TCustomCheckBox;
|
||||
const OldShortCut, NewShortCut: TShortCut); virtual;
|
||||
class procedure SetState(const ACustomCheckBox: TCustomCheckBox; const NewState: TCheckBoxState); virtual;
|
||||
class procedure AllowGrayedChanged(const ACustomCheckbox: TCustomCheckbox); virtual;
|
||||
end;
|
||||
TWSCustomCheckBoxClass = class of TWSCustomCheckBox;
|
||||
|
||||
@ -578,6 +579,11 @@ class procedure TWSCustomCheckBox.SetState(const ACustomCheckBox: TCustomCheckBo
|
||||
begin
|
||||
end;
|
||||
|
||||
class procedure TWSCustomCheckBox.AllowGrayedChanged(
|
||||
const ACustomCheckbox: TCustomCheckbox);
|
||||
begin
|
||||
end;
|
||||
|
||||
{ WidgetSetRegistration }
|
||||
|
||||
procedure RegisterCustomScrollBar;
|
||||
|
Loading…
Reference in New Issue
Block a user