Here I show how to transform the TIEColorButton into a "Color Randomizer":
type
TMyIEColorButton = class(TIEColorButton)
protected
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
end;
TIEColorButton = class(TMyIEColorButton);
implementation
procedure TMyIEColorButton.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
Form1.IEColorButton1.SelectedColor := RGB(Random(256), Random(256), Random(256));
end;
This saves the user a lot of work: Namely, to manually select a color in the color picker. He just has to click the button until he gets a color that he likes! ;-)