protected internal override bool ProcessDialogKey (Keys keyData)
{
if (!this.Selected || !this.HasDropDownItems)
return base.ProcessDialogKey (keyData);
if (!this.IsOnDropDown) {
if (this.Parent.Orientation == Orientation.Horizontal) {
if (keyData == Keys.Down || keyData == Keys.Enter) {
if (this.Parent is MenuStrip)
(this.Parent as MenuStrip).MenuDroppedDown = true;
this.ShowDropDown ();
this.DropDown.SelectNextToolStripItem (null, true);
return true;
}
} else {
if (keyData == Keys.Right || keyData == Keys.Enter) {
if (this.Parent is MenuStrip)
(this.Parent as MenuStrip).MenuDroppedDown = true;
this.ShowDropDown ();
this.DropDown.SelectNextToolStripItem (null, true);
return true;
}
}
} else {
if (keyData == Keys.Right || keyData == Keys.Enter) {
if (this.HasDropDownItems) {
this.ShowDropDown ();
this.DropDown.SelectNextToolStripItem (null, true);
return true;
}
}
}
return base.ProcessDialogKey (keyData);
}
#endregion