Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
单击 ComboBox 时,会导致它在窗口中被选中。有没有办法执行相当于 javascript blur()
不是直接的。不过,您可以尝试关注组合框或其他元素的根父级。
comboBox1.TopLevelControl.Focus();
或者
someControl.Focus();
我遇到了类似的问题,我设法通过禁用和重新启用组合框来解决它。
comboBox1.Enabled = false; comboBox1.Enabled = true;