将控件集中在Tab控件中 [英] Focus the controls in a Tabcontrol
本文介绍了将控件集中在Tab控件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Tab控件中选择Tabitem时如何集中控件?
How can focus the controls when select a tabitem in a tabcontrol?
推荐答案
您应该捕获TabControl的Selection更改事件,并在其中集中所需的控件.就像
You should capture the Selection changed event of the TabControl and inside that you focus the control you need. Just as
private void TabControl1_SelectionChanged(object sender, EventArgs e)
{
control1.Focus();
}
这篇关于将控件集中在Tab控件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文