TCustomColorComboBox: trigger custom color dialog on OnCloseUp instead of OnChange.Patch by theo. issue

git-svn-id: trunk@34337 -
This commit is contained in:
zeljko 2011-12-21 07:00:56 +00:00
parent 494b78cea1
commit ac028a407b

View File

@ -66,7 +66,7 @@ type
procedure Loaded; override;
procedure InitializeWnd; override;
procedure DoGetColors; virtual;
procedure Change; override;
procedure CloseUp; override;
function PickCustomColor: Boolean; virtual;
public
constructor Create(AOwner: TComponent); override;
@ -613,13 +613,13 @@ begin
OnGetColors(Self, Items)
end;
procedure TCustomColorBox.Change;
procedure TCustomColorBox.CloseUp;
begin
if (cbCustomColor in Style) and (ItemIndex = 0) then // custom color has been selected
PickCustomColor;
if ItemIndex <> -1 then
FSelected := Colors[ItemIndex];
inherited Change;
inherited CloseUp;
end;
function TCustomColorBox.PickCustomColor: Boolean;