mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 11:08:00 +02:00
lcl: call colorbox custom color dialog *before* firing Change event
git-svn-id: trunk@17629 -
This commit is contained in:
parent
7fad68ae28
commit
25088aa92b
@ -65,7 +65,7 @@ type
|
||||
procedure Loaded; override;
|
||||
procedure InitializeWnd; override;
|
||||
procedure DoGetColors; dynamic;
|
||||
procedure Select; override;
|
||||
procedure Change; override;
|
||||
function PickCustomColor: Boolean; virtual;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
@ -583,13 +583,13 @@ begin
|
||||
OnGetColors(Self, Items)
|
||||
end;
|
||||
|
||||
procedure TCustomColorBox.Select;
|
||||
procedure TCustomColorBox.Change;
|
||||
begin
|
||||
if (cbCustomColor in Style) and (ItemIndex = 0) then // custom color has been selected
|
||||
PickCustomColor;
|
||||
if ItemIndex <> -1 then
|
||||
FSelected := Colors[ItemIndex];
|
||||
inherited Select;
|
||||
inherited Change;
|
||||
end;
|
||||
|
||||
function TCustomColorBox.PickCustomColor: Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user