Last change
on this file since 1712 was 1693, checked in by healthsevak, 10 years ago |
Committing the files for first time to this new branch
|
File size:
1.1 KB
|
Rev | Line | |
---|
[1693] | 1 | unit Unit1;
|
---|
| 2 |
|
---|
| 3 | interface
|
---|
| 4 |
|
---|
| 5 | uses
|
---|
| 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics,
|
---|
| 7 | Forms, Dialogs, SpellCheck, Controls,
|
---|
| 8 | StdCtrls;
|
---|
| 9 |
|
---|
| 10 | type
|
---|
| 11 | TForm1 = class(TForm)
|
---|
| 12 | Label1: TLabel;
|
---|
| 13 | Edit1: TEdit;
|
---|
| 14 | Button1: TButton;
|
---|
| 15 | ListBox1: TListBox;
|
---|
| 16 | procedure FormCreate(Sender: TObject);
|
---|
| 17 | procedure Button1Click(Sender: TObject);
|
---|
| 18 | private
|
---|
| 19 | { Private declarations }
|
---|
| 20 | SpellCheck1: TSpellCheck;
|
---|
| 21 | public
|
---|
| 22 | { Public declarations }
|
---|
| 23 | end;
|
---|
| 24 |
|
---|
| 25 | var
|
---|
| 26 | Form1: TForm1;
|
---|
| 27 |
|
---|
| 28 | implementation
|
---|
| 29 |
|
---|
| 30 | {$R *.dfm}
|
---|
| 31 |
|
---|
| 32 | procedure TForm1.Button1Click(Sender: TObject);
|
---|
| 33 | begin
|
---|
| 34 | ListBox1.Clear;
|
---|
| 35 | if SpellCheck1.IsMisspelled(Edit1.Text) then
|
---|
| 36 | SpellCheck1.GetSuggestions(Edit1.Text, ListBox1.Items)
|
---|
| 37 | else
|
---|
| 38 | ShowMessage(Edit1.Text+' is not misspelled');
|
---|
| 39 | end;
|
---|
| 40 |
|
---|
| 41 | procedure TForm1.FormCreate(Sender: TObject);
|
---|
| 42 | begin
|
---|
| 43 | SpellCheck1 := TSpellCheck.Create(Self);
|
---|
| 44 | SpellCheck1.AffFileName := ExtractFilePath(Application.ExeName)+'dict\en_GB.aff';
|
---|
| 45 | SpellCheck1.DictFileName := ExtractFilePath(Application.ExeName)+'dict\en_GB.dic';
|
---|
| 46 | SpellCheck1.Active := True;
|
---|
| 47 | end;
|
---|
| 48 |
|
---|
| 49 | end.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.