Back to Devexpress

SpellChecker.SpellingFormShowing Event

windowsforms-devexpress-dot-xtraspellchecker-dot-spellchecker-18d92bea.md

latest3.3 KB
Original Source

SpellChecker.SpellingFormShowing Event

Occurs when the spelling form is about to be displayed.

Namespace : DevExpress.XtraSpellChecker

Assembly : DevExpress.XtraSpellChecker.v25.2.dll

NuGet Package : DevExpress.Win.SpellChecker

Declaration

csharp
public event SpellingFormShowingEventHandler SpellingFormShowing
vb
Public Event SpellingFormShowing As SpellingFormShowingEventHandler

Event Data

The SpellingFormShowing event's data class is SpellingFormShowingEventArgs. The following properties provide information specific to this event:

PropertyDescription
HandledGets or sets a value indicating whether default event actions are required. Inherited from FormShowingEventArgs.
SuggestionsProvides access to the collection of suggested words to be displayed at the spelling form.
WordGets a misspelled word for which the spelling form is invoked.

Remarks

Handle this event to customize the spelling form’s layout. The spelling form is displayed for each misspelled word, shows a list of suggestions to the user, and awaits the response.

csharp
private void spellChecker1_SpellingFormShowing(object sender, DevExpress.XtraSpellChecker.SpellingFormShowingEventArgs e)
{
    var spellDialogForm = spellChecker1.FormsManager.SpellCheckForm;

    spellDialogForm.Controls["btnIgnore"].Enabled = false;
    spellDialogForm.Controls["btnIgnoreAll"].Visible = false;
    spellDialogForm.Controls["btnChangeAll"].Visible = false;
    spellDialogForm.Controls.Add(new SimpleButton() { Text = "Custom Button", Size = new Size(100, 25), Location = new Point(10, 150) });
}
vb
Private Sub spellChecker1_SpellingFormShowing(ByVal sender As Object, ByVal e As DevExpress.XtraSpellChecker.SpellingFormShowingEventArgs) Handles spellChecker1.SpellingFormShowing
    Dim spellDialogForm = spellChecker1.FormsManager.SpellCheckForm

    spellDialogForm.Controls("btnIgnore").Enabled = False
    spellDialogForm.Controls("btnIgnoreAll").Visible = False
    spellDialogForm.Controls("btnChangeAll").Visible = False
    spellDialogForm.Controls.Add(New SimpleButton() With {.Text = "Custom Button", .Size = New Size(100, 25), .Location = New Point(10, 150)})
End Sub

See Also

SpellChecker Class

SpellChecker Members

DevExpress.XtraSpellChecker Namespace