0

I'm working with a custom RichTextBox which create small text blocks inside the TextBox. They are created with some text followed with a Enter or ',' key. When creating a item with Enter or just when i entered some text, i can delete it with my backspace button. That works fine...

But when i create a item with some text followed by the ',', the item appears but i can't delete it with my backspace. I get a exception while trying to and i don't know why and how to solve this... The exception even occurs before the TextChanged event of the textbox.

Full exception:

Object reference not set to an instance of an object.

at C1.Phone.RichTextBox.C1RichTextBox.InnerTextChanged(Object sender, TextChangedEventArgs e) at C1.Phone.RichTextBox.C1RichTextBox._txtBox_TextChanged(Object sender, TextChangedEventArgs e) at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

Can someone help me out with this please?

Community
  • 1
  • 1
Lars Meijdam
  • 1,049
  • 1
  • 9
  • 17
  • Can you share the code that adds the text blocks? Also, if `C1.Phone.RichTextBox.C1RichTextBox.InnerTextChanged` is a method you wrote, can you share that? – dbc Feb 22 '15 at 17:00
  • possible duplicate of [What is a NullReferenceException and how do I fix it?](http://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it) – dbc Feb 23 '15 at 13:49
  • @dbc i tried to manage it for the team to only accept the 'Enter' key. We noticed there is a small issue with the ',' key while accessing in the quick menu ( the Dot '.' submenu next to the enter ) the key will be processed as a dot. same as the other options in that menu – Lars Meijdam Apr 03 '15 at 06:30

0 Answers0