Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
935
UltraSpellChecker enable "The spelling check is complete" message
posted

Hello

I need to enable the "The spelling check is complete" message box.

If user enter text with correct spell it is not giving any message.

I am using the following on button click.

ultraSpellCheckerForComments.ShowSpellCheckDialog(this.textComments);

  • 4940
    Offline posted

    srajeshreddy said:

    Hello

    I need to enable the "The spelling check is complete" message box.

    If user enter text with correct spell it is not giving any message.

    I am using the following on button click.

    ultraSpellCheckerForComments.ShowSpellCheckDialog(this.textComments);

    Another way to do what you're asking is to use the SpellCheckDialogClosed event, and check if the Dialog result was OK (meaning not cancelled by the user). Code snippet showing the event is below:

     

    private void ultraSpellChecker1_SpellCheckDialogClosed(object sender, Infragistics.Win.UltraWinSpellChecker.SpellCheckDialogClosedEventArgs e)
    {
        if (e.DialogResult == System.Windows.Forms.DialogResult.OK)
        {
            MessageBox.Show("The spell checking is complete.",
                "Spell Checker",
                MessageBoxButtons.OK,
                MessageBoxIcon.Information);
        }
    }
    

     

  • 71886
    Suggested Answer
    Offline posted

    Hello, srajeshreddy

     

    From what I have understood you want to give the user a message if his spell check is OK.

    This means the number of errors after checking must be 0.

     

    So the code which I have prepared for you and may help you is:

     

            private void ultraSpellChecker1_SpellChecked(object sender, Infragistics.Win.UltraWinSpellChecker.SpellCheckedEventArgs e)

            {

                if (e.Errors.Count == 0)

                {

     

                    MessageBox.Show("There are not any errors in the text", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);

     

                }

            }

     

    This is one possible approach to solve the issue.

     

    Firing of this event means the spell check is over and the number of errors is known.

     

    Please feel free to ask anything about your case.