Switch focus back to editor from editor view part

This issue is sort of a follow-up to my question about updating the target segment of a TU from a custom editor view part (https://community.sdl.com/developers/language-developers/f/57/t/5133)

I have a view part that contains a DataGridView control.  When the user navigates to a segment in the translation editor, the data grid gets populated with some data corresponding to the current segment.  When that happens, the focus gets automatically moved to my view part, and specifically to the data grid, which is in fact the desired behavior.

However the problem is that after using the data grid to manipulate the related data and using an event in the data grid to update the target segment using UpdateSegmentPair, the focus stays on the data grid in my view part, but I would like to move the focus back to the translation editor.  Unfortunately I can't see a direct way to do that.  Right now I'm using SendKeys("{TAB}") several times, but it is very buggy and only works some of the time.

Is there a way to directly place the focus back on the translation editor from code?

Parents Reply Children