This is a migrated thread and some comments may be shown as answers.

Disable 'add to dictionary'?

4 Answers 57 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 19 Sep 2014, 02:26 PM
Is there a way to disable the add to dictionary button from the dialog created in the WinControls RadSpellChecker?

4 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 24 Sep 2014, 12:53 PM
Hello David,

Thank you for writing.

You can subscribe to the SpellingFormShowing event and hide or disable the "Add To Dictionary" button accessing the respective control via the Form.Controls collection:
private void radSpellChecker1_SpellingFormShowing(object sender, SpellingFormShowingEventArgs e)
{
    //e.SpellingForm.Controls["buttonAddToDictionary"].Visible = false;
    e.SpellingForm.Controls["buttonAddToDictionary"].Enabled = false;
}

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
MS
Top achievements
Rank 1
answered on 01 Oct 2017, 03:40 AM

Hello,

How about the one that displayed in the context menu when you choose AutoSpellCheck? Is there a way to disable the 'add to dictionary' menu?

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 02 Oct 2017, 07:29 AM
Hello, Machiko, 

Thank you for writing.  

Here is a sample code snippet demonstrating how to disable the "Add to Dictionary" item in the context menu when a RadSpellChecker is used to auto spellchecked the RadTextBox:
public RadForm1()
{
    InitializeComponent();
 
    this.radSpellChecker1.AutoSpellCheckControl = this.radTextBox1;
 
    TextBoxSpellChecker textSpellChecker = this.radSpellChecker1.GetControlSpellChecker(typeof(RadTextBox)) as TextBoxSpellChecker;
    if (textSpellChecker != null)
    {
        textSpellChecker.DropDownMenu.PopupOpening += DropDownMenu_PopupOpening;
    }
}
 
private void DropDownMenu_PopupOpening(object sender, CancelEventArgs args)
{
    RadDropDownMenu menu = sender as RadDropDownMenu;
    foreach (RadItem item in menu.Items)
    {
        if (item.Text.Contains("Add to Dictionary"))
        {
            item.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
        }
    }
}

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
MS
Top achievements
Rank 1
answered on 02 Oct 2017, 03:39 PM
Thank you it worked! 
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
MS
Top achievements
Rank 1
Share this question
or