summaryrefslogtreecommitdiff
path: root/examples/windoze/delphi20/svertf/Searchdlg.pas
diff options
context:
space:
mode:
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.