aboutsummaryrefslogtreecommitdiffstats
path: root/examples/windoze/delphi20/svertf/Searchdlg.pas
diff options
context:
space:
mode:
authordanglassey <danglassey>2002-08-14 09:57:17 +0000
committerdanglassey <danglassey>2002-08-14 09:57:17 +0000
commitc9458897ebbb739d8db83c80e06512d8a612f743 (patch)
treef8c5381045887e34388cc6b26cfccc254bf766dc /examples/windoze/delphi20/svertf/Searchdlg.pas
downloadsword-sf-cvs-c9458897ebbb739d8db83c80e06512d8a612f743.tar.gz
*** empty log message ***
Diffstat (limited to 'examples/windoze/delphi20/svertf/Searchdlg.pas')
-rw-r--r--examples/windoze/delphi20/svertf/Searchdlg.pas59
1 files changed, 59 insertions, 0 deletions
diff --git a/examples/windoze/delphi20/svertf/Searchdlg.pas b/examples/windoze/delphi20/svertf/Searchdlg.pas
new file mode 100644
index 0000000..0e8475f
--- /dev/null
+++ b/examples/windoze/delphi20/svertf/Searchdlg.pas
@@ -0,0 +1,59 @@
+unit searchdlg;
+
+interface
+
+uses
+ SWKey, Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls;
+
+type
+ TSearchForm = class(TForm)
+ Edit1: TEdit;
+ Button1: TButton;
+ Button2: TButton;
+ ListBox1: TListBox;
+ Label1: TLabel;
+ procedure Button2Click(Sender: TObject);
+ procedure Button1Click(Sender: TObject);
+ procedure ListBox1DblClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ SearchForm: TSearchForm;
+
+implementation
+
+uses LogoMain;
+
+{$R *.DFM}
+
+procedure TSearchForm.Button2Click(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TSearchForm.Button1Click(Sender: TObject);
+var
+ results:TSWKey;
+begin
+ results := SwordAppForm.mrtWebster.Search(PChar(Edit1.Text));
+ while (results.Error = 0) do
+ begin
+ ListBox1.Items.Add(results.text);
+ results.Inc;
+ end;
+end;
+
+procedure TSearchForm.ListBox1DblClick(Sender: TObject);
+begin
+ SwordAppForm.vkcommonkey.text := ListBox1.items[listbox1.itemindex];
+ SwordAppForm.lblTextKeyText.Caption := SwordAppForm.vkCommonKey.Text;
+ SwordAppForm.edTextBox.Display;
+ SwordAppForm.edCommentBox.Text := SwordAppForm.mrcMHC.Text;
+end;
+
+end.