summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-31 18:51:55 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-31 18:51:55 +0200
commit4c979d123588de654f5f9c6db429e51079681463 (patch)
treea29900a60293b763fe7c7f2e067f6a07c690ae3d
parentc1cf10c36fb4119aaa96b8dc58980c64a3182e6e (diff)
downloadfpGUI-4c979d123588de654f5f9c6db429e51079681463.tar.xz
ide: Only enable the Replace edit field if the Replace checkbox is checked.
-rw-r--r--examples/apps/ide/src/frm_find.pas8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/apps/ide/src/frm_find.pas b/examples/apps/ide/src/frm_find.pas
index 3ed5c30a..c781f956 100644
--- a/examples/apps/ide/src/frm_find.pas
+++ b/examples/apps/ide/src/frm_find.pas
@@ -33,6 +33,7 @@ type
btnFind: TfpgButton;
btnHelp: TfpgButton;
{@VFD_HEAD_END: FindForm}
+ procedure chkReplaceChanged(Sender: TObject);
public
procedure AfterCreate; override;
end;
@@ -75,6 +76,11 @@ end;
{@VFD_NEWFORM_IMPL}
+procedure TFindForm.chkReplaceChanged(Sender: TObject);
+begin
+ edtReplaceText.Enabled := chkReplace.Checked;
+end;
+
procedure TFindForm.AfterCreate;
begin
{%region 'Auto-generated GUI code' -fold}
@@ -116,6 +122,7 @@ begin
Hint := '';
TabOrder := 3;
Text := 'Replace with';
+ OnChange := @chkReplaceChanged;
end;
edtReplaceText := TfpgEdit.Create(self);
@@ -124,6 +131,7 @@ begin
Name := 'edtReplaceText';
SetPosition(4, 70, 292, 24);
Anchors := [anLeft,anRight,anTop];
+ Enabled := False;
ExtraHint := '';
FontDesc := '#Edit1';
Hint := '';