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
690
Spell check a combo box
posted

Hi!

Is this possible?

As a side note I am having some difficulty integrating a universal spellchecking/autocomplete system for my project. I've been forced to differeciate between EmbeddableEditorBase > EditorWithText and TextEditorControlBase > UltraTextEditor, which has caused me to have to write the same code twice. I cannot find a superclass that fits both of these types, and the combinations of EditorWithXXX/EmbeddableXXX are quite confusing.

At the end of the day, I want to:

  1. myEditor.ButtonsRight.Add(newOptionsButton)
  2. AddHandler myEditor.KeyDown, AddressOf myEditorKeyDown
  3. myEditor.SpellChecker = mySpellChecker

But I'm running around the houses casting everything into known types for the first two. The spellcheck is easy on the UltraGrid so far, but not accessible for dropdown lists.

Thanks, Tom

  • 690
    posted

    On another note, this actually works...

    Dim editor As EditorWithText = TryCast(sender, EditorWithText)
    Dim embedded As EmbeddableTextBox = TryCast(sender, EmbeddableTextBox)
    If editor Is Nothing Then
        Dim owner As Object = GetType(EmbeddableTextBox).GetProperty("OwningEditor",
                             Reflection.BindingFlags.Instance Or
                              Reflection.BindingFlags.NonPublic).GetValue(
    embedded, Nothing) editor = owner End If