diff options
author | Jean-Marc.Levecque <jmarc.levecque@bbox.fr> | 2015-07-10 21:29:52 +0200 |
---|---|---|
committer | Jean-Marc.Levecque <jmarc.levecque@bbox.fr> | 2015-07-10 21:29:52 +0200 |
commit | 3828f49d6ce3bdca0c6c3415f8e026b395038a7d (patch) | |
tree | 6cecfdcadca66fddeffaf296d79fd5f766470dae /examples/gui/colorwheel | |
parent | 2d5c22c3beea73d564f67f3ffc6e577a1f2b9f20 (diff) | |
download | fpGUI-3828f49d6ce3bdca0c6c3415f8e026b395038a7d.tar.xz |
Color setting improvement in colorwheel
Signed-off-by: Jean-Marc.Levecque <jmarc.levecque@bbox.fr>
Diffstat (limited to 'examples/gui/colorwheel')
-rw-r--r-- | examples/gui/colorwheel/frm_main.pas | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/examples/gui/colorwheel/frm_main.pas b/examples/gui/colorwheel/frm_main.pas index 68e0c36c..d01cedd0 100644 --- a/examples/gui/colorwheel/frm_main.pas +++ b/examples/gui/colorwheel/frm_main.pas @@ -77,6 +77,7 @@ type procedure UpdateRGBComponents; procedure ColorChanged(Sender: TObject); procedure RGBChanged(Sender: TObject); + procedure RGBChanging; procedure ConvertToInt(Value: string); procedure eHexKeyChar(Sender: TObject; AChar: TfpgChar; var Consumed: boolean); procedure eHexKeyPress(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; @@ -240,6 +241,11 @@ begin end; procedure TMainForm.RGBChanged(Sender: TObject); +begin + RGBChanging; +end; + +procedure TMainForm.RGBChanging; var rgb: TRGBTriple; c: TfpgColor; @@ -337,7 +343,7 @@ begin if ((KeyCode= KeyReturn) or (KeyCode= KeyPEnter)) and (Length(eHex.Text)= 7) then begin ConvertToInt(eHex.Text); - RGBChanged(Sender); + RGBChanging; end; end; @@ -346,7 +352,7 @@ begin if Length(eHex.Text)= 7 then begin ConvertToInt(eHex.Text); - RGBChanged(Sender); + RGBChanging; end; end; @@ -506,6 +512,7 @@ begin MaxValue := 255; Value := 255; FontDesc := '#Edit1'; + OnChange := @RGBChanged; OnExit := @RGBChanged; end; @@ -519,6 +526,7 @@ begin MaxValue := 255; Value := 255; FontDesc := '#Edit1'; + OnChange := @RGBChanged; OnExit := @RGBChanged; end; @@ -532,6 +540,7 @@ begin MaxValue := 255; Value := 255; FontDesc := '#Edit1'; + OnChange := @RGBChanged; OnExit := @RGBChanged; end; |