A spell checker- help in code needed

Posted by pooja on April 25, 2008

Hello,

I am making a spell checker and a beginner in Delphi.

Well, I have 2 forms - Form1 has a MemoBox, and 3 buttons (Open File, Check File and Save File). When I click on Open file, the selected file is loaded in MemoBox and when I click on check file. It should start checking for spelling checks. and saving a file..shud save the file. In my Form 2, I have 2 edit boxes for 'Not in dictionary' and 'replace with' and 2 buttons 'Ignore' and 'Change'.

Now I am stuck with 'Check file' code in Form 1. As soon as click on this button, the cursor should go to MemoBox. and it should start checking word by word from my 'list_of_words.text'. In case it found or not , Form 2 shoudl show up.

I am not able to write code for this.
I have just written this and dont know how to proceed. Pls suggest.

procedure TForm1.BitBtn3Click(Sender: TObject);
var
Txt:string;
StartPos, TxtLen, FoundPos:integer;
begin
try
While not EOF(MemoBox.text) do
begin
StartPos:=MemoBox.SelStart+MemoBox.SelLength

//I think it will go char by char and as soon as it will find a space '', it will treat it as a word and then look up in the 'list_of_words.text' file.

Regards
Pooja

Related articles

       

Follow Ups