Posted 14 July 2022, 3:17 pm EST - Updated 3 October 2022, 1:22 pm EST
There is an issue with the right click context menu item “Spelling”.
This issue does not effect the selection of a spelling suggestion.
In other words, the issue effects the button I have highlighted in Red. The option highlighted in green works all good.
The issue is only if the TextBox is bound to a BindingSource.
If you click the “Spelling” button, all changes made to the textbox since load disappear straight away. In other words, the difference between what was bound, and what is currently in the textbox.
Here are pictures to explain what I mean.
To mitigate the problem I listen to the TextBox MouseDown event and call BindingSource.EndEdit(), but I do not like this solution as it is prone to error down the track when I use the Spelling Control on another bound text box.
This does not happen if the TextBox is not bound.
Is this a known issue?
Also, is there a way to override the “Spelling” button on the context menu to call CheckControl with “false” for FromCursor instead of true? Because even if the user right clicks on a word at the start of the TextBox and uses that button it will not show the dialog at all if the cursor is currently at the end of the textbox.