public bool OnKeyPress(System.Windows.Forms.KeyPressEventArgs e) { for (int index = 0; index < m_ChildWidgets.Count; index++) { IWidget currentWidget = m_ChildWidgets[index] as IWidget; if (currentWidget != null && currentWidget is IInteractive) { IInteractive currentInteractive = m_ChildWidgets[index] as IInteractive; bool handled = currentInteractive.OnKeyPress(e); if (handled) { return(handled); } } } return(false); }