I have 2 toolbars, each has a BarComboBox.
When one combobox has focus and the user presses 'Tab' I want the focus to change to the combobox on the 2nd toolbar.
I have this working by deriving a class from BarComboBoxLink and storing a reference to the other combobox (in my example this is named NextCommandLink):
protected override ActiproSoftware.ComponentModel.DefaultableBoolean ProcessKeyDown(Keys key)
{
if (key == Keys.Tab)
{
if (this.NextCommandLink != null && this.NextCommandLink.Control.Visible)
{
this.NextCommandLink.BarControl.SelectedCommandLink = this.NextCommandLink;
this.NextCommandLink.Control.Focus();
return ActiproSoftware.ComponentModel.DefaultableBoolean.True;
}
}
...
}
This sort of works, but the other controls on the newly active toolbar don't respond correctly as if the toolbar state has not correctly been updated to be focussed and enabled (where as if I just click in the combobox on the 2nd toolbar using the mouse they work as expected).
Is there a better way to do this?