颜色对话框,该如何处理

颜色对话框//当用户点击颜色对话框上的“取消”按钮的时候不要将edtPcolorCur的color属性给改变呀procedure

颜色对话框
//当用户点击颜色对话框上的“取消”按钮的时候不要
将edtPcolorCur的color属性给改变呀
procedure TFormSetting.Button4Click(Sender: TObject);
begin
  colorDialog1.Execute;
  edtPcolorCur.Color := colorDialog1.Color;
end;

[解决办法]
procedure TFormSetting.Button4Click(Sender: TObject); 
begin 
if colorDialog1.Execute then 
edtPcolorCur.Color := colorDialog1.Color; 
end;