Hello, we have a plugin that uses custom view items. We have textboxes in the view items, and when someone tries to type a value using the numpad, the selected view tile switches to whatever corresponding number key was pressed.
Please see the Chat sample and find the following code. If you comment out “e.IsInputKey = true;” then you will be able to see the same issue as you mentioned. So please combine following sentence in your code.
I tried playing around with that and the KeyDown but no joy. Also, it looks like the Chat plugin from the latest MIP SDK does not use any ViewItemPlugin, but it does use SidePanelPlugin and OptionsDialogPlugin. The numpad keystrockes still change the active view, even when firing the
The root cause of the problem is that the Smart Client is a WPF application and the view item plugin in question is a WinForms control. WinForms is supported to some extent, but we would always recommend writing UI plugin code using WPF as this will be natively supported.
In essence, we’re currently not able to get a handle to the Active WinForms control located in one of possibly quite many WinFormHosts that are loaded in the Smart Client, and therefore cannot suppress the generic key handling which is causing the selected view item to change.
For WPF plugins, we will be able to get that handle, and therefore you will not see the problem.
I would recommend you spend a little time rewriting the view item plugin to WPF, that is the best option.
As Rie mentioned, we have an ongoing investigation into whether or not we can somehow get the correct handle and suppress the key handling for input elements that are from the WinForms namespace. However I cannot promise a fix, and therefore not give an ETA for it either.
Milestone plans to fix this issue. But it has never been prioritized, so it is not possible to say when, or even if, this will be developed. Please keep eye on the news from Milestone.