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:
paul 2009-09-06 10:55:38 +00:00
parent 194d83f7a8
commit 747eead0bb

View File

@ -431,6 +431,9 @@ procedure TCustomColorBox.SetSelected(Value: TColor);
var
c: integer;
begin
if Selected = Value then
Exit;
if HandleAllocated then
begin
FSelected := Value;
@ -439,6 +442,7 @@ begin
if Colors[c] = Value then
begin
ItemIndex := c;
inherited Change;
Exit;
end;
end;
@ -453,6 +457,7 @@ begin
end
else
FSelected := Value;
inherited Change;
end;
procedure TCustomColorBox.SetStyle(const AValue: TColorBoxStyle);