LayoutControl布局,使用ActiveControl时,值始终是LayoutControl
/// <summary>/// Tab键的转换
/// </summary>
/// <param name="msg">window消息</param>
/// <param name="keyData">代码</param>
/// <returns></returns>
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if((!(ActiveControl is DevExpress.XtraEditors.SimpleButton)) && (keyData == Keys.Up || keyData == Keys.Down || keyData == Keys.Enter))
{
if (keyData == Keys.Enter)
{
System.Windows.Forms.SendKeys.Send("{TAB}");
return true;
}
if (keyData == Keys.Down)
{
System.Windows.Forms.SendKeys.Send("{TAB}");
}
else
{
SendKeys.Send("+{Tab}");
}
return true;
}
else
{
return base.ProcessCmdKey(ref msg, keyData);
}
}
ActiveControl 类型为什么始终是LayoutControl ,求各位大神指点
页:
[1]