The following tutorial demonstrates how you can make RadSpellChecker
check a simple text-editing control - RadTextBox.
Note |
|---|
Before executing the following steps, please make sure that the
target framework of the project in which you are going to use RadSpellChecker
is .NET Framework 4.0. This will allow you to see RadSpellChecker in your Toolbox and work with it. |
Drag and drop RadTextBox from your Toolbox to your form.
Drag and drop RadSpellChecker from your Toolbox to your form.
Drag and drop RadButton from your Toolbox to your form. When clicked this
button will invoke the spell-checking capabilities of RadSpellChecker.
Set the text of RadTextBox so that it contains some typos, for example:
Copy[C#]
this.radTextBox1.Text = "The quik broun foxx jumpd ovur lasy dog";
Copy[VB.NET]
Me.RadTextBox1.Text = "The quik broun foxx jumpd ovur lasy dog"
Subscribe to Click event of the button. In the Click event handler call the Check
method of RadSpellChecker and pass the RadTextBox instance as a parameter:
Copy[C#]
private void radButton1_Click(object sender, EventArgs e)
{
this.radSpellChecker1.Check(this.radTextBox1);
}
Copy[VB.NET]
Private Sub RadButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadButton1.Click
Me.RadSpellChecker1.Check(Me.RadTextBox1)
End Sub
Now when you
press the button, RadSpellChecker form will appear with the appropriate suggestions
for the mistaken words: