Registriert seit: 17. Mai 2007
482 Beiträge
Delphi XE6 Professional
|
Re: Change one value + many OnChange events = stack overflow
30. Dez 2011, 19:33
Sure, this is sample:
Delphi-Quellcode:
OnFormCreate:
UpdateColor(clWhite);
OnHSLChange:
UpdateColor(HSLPicker.SelectedColor);
OnRGBChange:
UpdateColor( RGB(R, G, B));
OnHSLChange:
HSLToRGB()
UpdateColor()
OnCMYKChane:
CMYKToRGB()
UpdateColor()
UpdateColor( const AColor: TColor):
Preview.Color := AColor;
GetRGBValues(Preview.Color, R, G, B);
edtR.Value := R;
// ... get RGB, HSL and CMYK and set edits
HSLPicker.SelectedColor := AColor;
Picker is the one from mbColorLib.
|
|
Zitat
|