Unplanned
Last Updated: 30 Mar 2016 13:17 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 31 Mar 2015 10:05
Category: Editors
Type: Bug Report
1
FIX. RadTextBoxControl - custom menu items added in the ContextMenuOpening are not displayed if the suggestions list from the spell-checking functionality is shown
To reproduce:
public RadForm1()
{
    InitializeComponent();

    this.radTextBoxControl1.Text = "Sample text with misspelledd word";
    RadSpellChecker spellChecker1 = new RadSpellChecker();
    spellChecker1.AutoSpellCheckControl = radTextBoxControl1;
}

private void radTextBoxControl1_ContextMenuOpening(object sender, TreeBoxContextMenuOpeningEventArgs e)
{
    RadMenuItem customItem= new RadMenuItem("Custom item");
    e.ContextMenu.Items.Add(customItem);
}

Workaround: use RadTextBox instead:
RadSpellChecker spellChecker1 = new RadSpellChecker();    
this.radTextBox1.Text = "Sample text with misspelledd word";
spellChecker1.AutoSpellCheckControl = this.radTextBox1;
TextBoxSpellChecker tbSpellChecker = spellChecker1.GetControlSpellChecker(typeof(RadTextBox)) as TextBoxSpellChecker;
tbSpellChecker.DropDownMenu.DropDownOpening += DropDownMenu_DropDownOpening;

private void DropDownMenu_DropDownOpening(object sender, CancelEventArgs e)
{
    RadDropDownMenu menu = sender as RadDropDownMenu;
    RadMenuItem customItem = new RadMenuItem("Custom item");
    menu.Items.Add(customItem);
}
Attached Files:
0 comments