diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-05-19 16:39:19 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-05-19 16:39:19 +0200 |
commit | d19273b99f8b4dd3bbe03eef0f0bcc7b338b13e8 (patch) | |
tree | 7a2db7925333c349e7a031084349a0b15195530c | |
parent | 8d104a291337466736df5fcbdb82e2a00580a782 (diff) | |
download | fpGUI-d19273b99f8b4dd3bbe03eef0f0bcc7b338b13e8.tar.xz |
Checkbox: setting checked now fires OnChange event
Before the OnChange was not fired, but now it is. The only exception is while
the widget is in the UI Designer form.
-rw-r--r-- | src/gui/fpg_checkbox.pas | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/fpg_checkbox.pas b/src/gui/fpg_checkbox.pas index 55c9a3a8..a68ecfa0 100644 --- a/src/gui/fpg_checkbox.pas +++ b/src/gui/fpg_checkbox.pas @@ -1,7 +1,7 @@ { fpGUI - Free Pascal GUI Toolkit - Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this + Copyright (C) 2006 - 2011 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -116,6 +116,8 @@ begin Exit; //==> FChecked := AValue; RePaint; + if not (csDesigning in ComponentState) then + DoOnChange; end; function TfpgBaseCheckBox.GetBoxLayout: TBoxLayout; @@ -244,7 +246,6 @@ begin inherited HandleLMouseUp(x, y, shiftstate); FIsPressed := False; Checked := not FChecked; - DoOnChange; end; procedure TfpgBaseCheckBox.HandleKeyRelease(var keycode: word; @@ -254,7 +255,6 @@ begin begin consumed := True; Checked := not FChecked; - DoOnChange; end; if consumed then |