If I add an UltraSpellChecker to a RichTextBox, whenever I type into that box, the text flickers horribly. Any underline spelling errors also flicker. Is there any way to prevent this? I'm using 10.3.2067.
Hello Campbell,
Thanks for provided information. Please note that I create two private cases for you with Ref numbers
- CAS-105976-J5S9G4
- CAS-105977-Z9W9P8
I`ll send you additional information thriugh these cases. Let me know if you have any questions.
Regards
Hi Georgi,
Thanks for replying. However, I think you are missing the point. If the UltraFormattedTextEditor contains the text:
ONE TWO THREEFOUR FIVE SIXSEVEN EIGHT NINE
If you then place the cursor after the word SEVEN, then SelectionStart reports this as position 33. However, if you look at position 33 in the Text property returned from the control, this places the cursor after the V in SEVEN. This is caused by the SelectionStart counting carriage return characters as a single character, whereas the Text property returns carriage returns as 2 characters. SelectionStart should really be reporting 35 in this example. This is a bug! If you don't think so, then please copy and paste this whole reply into the textbox, and show me how I can write code to return the actual word clicked on by the mouse, without having to do some sort of conversion for the carriage returns.
Secondly, your video shows the difference between the character positions in the menu and textbox. This isn't due to custom code, it is due to the fact that the BeforeToolDropdown event is firing before the SelectionStart property is updated. Again, this is a bug. I can work around this by cancelling the menu popup, creating a timer set to 1 millisecond and starting it in the BeforeToolDropdown event, and then building the menu once the timer fires and manually popping the menu back up, but I should not have to do this.
Thirdly, I think it is bizarre that you should show the spell correction underline in a different place just because it is a different control. Surely that isn't a deliberate feature? Why would you not make it consistent? I need to use formatting (font style, colours) hence the initial use of RichTextBox, so assume UltraTextEditor won't fulfil my needs.
Thanks,Campbell
Here is the video file
Looking at the provided sample, the mentioned issue with SelectionStart possition is cause from the custom code in the sample. Please take a look at the attached video file for more details.
About the second issue "Secondly, the spell check underlines on the FormattedTextEditor appear in a different place (higher up) than the RichTextBox (see attached image)" - if you want similar behavior like RichtextBox, you could use our UltraTextEditor instead of UltraFormattedTextEditor. Please take a look at the attached screenshot.
Let me know if you have any further questions
And another thing. Is there something special I need to do to get Drag/Drop working on the FormattedTextEditor? I have set AllowDrop = True, and in DragEnter I have set e.Effect = DragDropEffects.Copy, yet I am still getting the NoEntry cursor appearing. This worked fine in the RichTextBox.EDIT - Turns out I can get this to work by changing e.Effect = DragDropEffects.Move. Any idea why it doesn't work with Copy?