Actually, it
is kind of easy. ( or at least the 90% I have so far is )
First, the ctrl-tab handled by the tabcontrol has to be disabled. In the subclass of TabControl :
Public Class MyTabControl
Inherits MicroFour.StrataFrame.UI.Windows.Forms.TabControl
Protected Overrides Sub OnKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs)
If e.KeyCode = Keys.Tab AndAlso e.Control Then
e.Handled = False
e.SuppressKeyPress = False
Else
MyBase.OnKeyDown(e)
End If
End Sub
End Class
This allows the cntrl-tab to fire in the Ultragrid and to actually leave the grid and the groupbox. The problem is, I can't tell where it goes next. the next control doesn't get focus, but tab again and the control after that gets focus, so it did honor the tab order but somehow lost energy for focusing.
But if I explicitly call the focus() of that next control in the tab order in groupbox.leave everything is good.
Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox1.Enter
Me.grdCustomers.Focus()
End Sub
Private Sub GroupBox1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles GroupBox1.Leave
Me.Textbox2.Focus()
End Sub
For now, this will work, though I want to make it generic and actually have a subclassed groupbox that knows how to set focus to its contained ultragrid on Enter and set focus to the next control according to the TabOrderController on Leave.
I'll be working on it more but here is it so far