3.5 features: Filtering text with IME languages

So 3.5 beta2 is out and it has quite a lot of features. So one of them is the filtering mechanism for IME languages. This was not a problem in the english and other non-IME languages. The problems were the events associated with IME input - TextInputStart/Update/input... A major concern was that it was not possible to determine where the composition took place. Now all these issues have been fixed and filtering in these languages is a breeze. I came up with a sample calculator with the filtered IME textbox which shows how the filtering is done for IME languages. If you go through the code, you will notice that min max positions of the composition are tracked in the events to determine the correct caret position after the filter is applied.

The textbox takes any ime input and filters the characters after the composition is complete. The sample project is included to demonstrate the usage of the events. The project also includes a filtered richtextbox even though its not used in the demo app.

In addition to the textbox check out the buttons. It makes use of the Viewport2DVisual3D class which enables placing UIElements on top of 3D which is pretty neat. The window style is the one created by Pavan.

Share this post


IME calc.zip

Comments (0)

Skip to main content