mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 23:39:24 +02:00
lcl: TColorBox: trigger OnChange event when manually change selected color (by Denis Golovan, issue #0014516)
git-svn-id: trunk@21588 -
This commit is contained in:
parent
194d83f7a8
commit
747eead0bb
@ -431,6 +431,9 @@ procedure TCustomColorBox.SetSelected(Value: TColor);
|
|||||||
var
|
var
|
||||||
c: integer;
|
c: integer;
|
||||||
begin
|
begin
|
||||||
|
if Selected = Value then
|
||||||
|
Exit;
|
||||||
|
|
||||||
if HandleAllocated then
|
if HandleAllocated then
|
||||||
begin
|
begin
|
||||||
FSelected := Value;
|
FSelected := Value;
|
||||||
@ -439,6 +442,7 @@ begin
|
|||||||
if Colors[c] = Value then
|
if Colors[c] = Value then
|
||||||
begin
|
begin
|
||||||
ItemIndex := c;
|
ItemIndex := c;
|
||||||
|
inherited Change;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -453,6 +457,7 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
FSelected := Value;
|
FSelected := Value;
|
||||||
|
inherited Change;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomColorBox.SetStyle(const AValue: TColorBoxStyle);
|
procedure TCustomColorBox.SetStyle(const AValue: TColorBoxStyle);
|
||||||
|
Loading…
Reference in New Issue
Block a user