mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 12:19:36 +02:00
LCL/TColorBox, TColorListbox: Add missing Notification procedure. Issue #39518.
(cherry picked from commit 6efaae3d24
)
This commit is contained in:
parent
e1d74d0a94
commit
1dfb84cfbc
@ -49,7 +49,7 @@ type
|
|||||||
FColorRectOffset: Integer;
|
FColorRectOffset: Integer;
|
||||||
FDefaultColorColor: TColor;
|
FDefaultColorColor: TColor;
|
||||||
FNoneColorColor: TColor;
|
FNoneColorColor: TColor;
|
||||||
FcolorDialog:TColorDialog;
|
FColorDialog:TColorDialog;
|
||||||
FOnGetColors: TGetColorsEvent;
|
FOnGetColors: TGetColorsEvent;
|
||||||
FStyle: TColorBoxStyle;
|
FStyle: TColorBoxStyle;
|
||||||
FSelected: TColor;
|
FSelected: TColor;
|
||||||
@ -76,6 +76,7 @@ type
|
|||||||
procedure DoGetColors; virtual;
|
procedure DoGetColors; virtual;
|
||||||
procedure CloseUp; override;
|
procedure CloseUp; override;
|
||||||
function PickCustomColor: Boolean; virtual;
|
function PickCustomColor: Boolean; virtual;
|
||||||
|
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
property ColorRectWidth: Integer read GetColorRectWidth write SetColorRectWidth stored ColorRectWidthStored;
|
property ColorRectWidth: Integer read GetColorRectWidth write SetColorRectWidth stored ColorRectWidthStored;
|
||||||
@ -198,6 +199,7 @@ type
|
|||||||
procedure DoGetColors; virtual;
|
procedure DoGetColors; virtual;
|
||||||
procedure DoSelectionChange(User: Boolean); override;
|
procedure DoSelectionChange(User: Boolean); override;
|
||||||
function PickCustomColor: Boolean; virtual;
|
function PickCustomColor: Boolean; virtual;
|
||||||
|
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
property ColorRectWidth: Integer read GetColorRectWidth write SetColorRectWidth stored ColorRectWidthStored;
|
property ColorRectWidth: Integer read GetColorRectWidth write SetColorRectWidth stored ColorRectWidthStored;
|
||||||
@ -738,6 +740,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomColorBox.Notification(AComponent: TComponent; Operation: TOperation);
|
||||||
|
begin
|
||||||
|
inherited Notification(AComponent, Operation);
|
||||||
|
if (Operation = opRemove) and (AComponent = FColorDialog) then
|
||||||
|
FColorDialog := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomColorListBox.Create
|
Method: TCustomColorListBox.Create
|
||||||
@ -1095,5 +1105,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomColorListBox.Notification(AComponent: TComponent; Operation: TOperation);
|
||||||
|
begin
|
||||||
|
inherited Notification(AComponent, Operation);
|
||||||
|
if (Operation = opRemove) and (AComponent = FColorDialog) then
|
||||||
|
FColorDialog := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user