diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-03-29 10:53:33 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-03-29 10:53:33 -0400 |
commit | 8d3fc864d094eeadc721f8e93436b37a5fab173e (patch) | |
tree | 05e201c67dca55b4ccdf90ad479a25d95e3b1e63 /examples/windoze/delphi20/multimo4/Searchdlg.pas |
Imported Upstream version 1.5.3
Diffstat (limited to 'examples/windoze/delphi20/multimo4/Searchdlg.pas')
-rw-r--r-- | examples/windoze/delphi20/multimo4/Searchdlg.pas | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/examples/windoze/delphi20/multimo4/Searchdlg.pas b/examples/windoze/delphi20/multimo4/Searchdlg.pas new file mode 100644 index 0000000..1cf83fc --- /dev/null +++ b/examples/windoze/delphi20/multimo4/Searchdlg.pas @@ -0,0 +1,60 @@ +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 + ListBox1.Clear; + 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. |