TabControl中的帮助

TabControl中的帮助

本文介绍了TabControl中的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的WinForm TabControl中,在TabControl中三个Tab&botton的名称为Botton的下一步".单击Botton时,转到"Next Tab"
怎么样?
是表单Indax TabPage ???



注意:Winform&Out TabCotrol中的Botton.

In my WinForm TabControl in TabControl three Tab & botton the name of Botton ''Next'' When click the Botton go to Next Tab
How ?
Are form Indax TabPage ???



Note: The Botton in Winform & out TabCotrol.

推荐答案


int i = 0;
        private void btnext_Click(object sender, EventArgs e)
        {
            if (i <= 3)  //using 3 A/c to your question you can change it
            {
                tabControl1.SelectedIndex = i;
                tabControl1.TabPages[i].Parent.Focus();
                i++;    // Increase counter
            }
            else
            {
             //you Message
            }
        }


private void btnNext_Click(object sender, EventArgs e)
        {
            int NumIndex = tabControl1.SelectedIndex;
            if (NumIndex < tabControl1.TabPages.Count-1)
            {
                tabControl1.SelectTab(NumIndex + 1);
            }
        }


这篇关于TabControl中的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 00:30