开发者

Controling Tab page changes Winforms

I am building a .Net 3.开发者_C百科5 WinForms based questionnaire comprising 9 steps (each on a tab page using a TabControl control). I would like users to move to the next tab ONLY when they click a "Next Step" button I've provided and not jump to later steps by clicking on the tab buttons above. Basically, I dont want them to see contents of later steps/tab pages without completing the current step/tab page they are on, and then clicking my "Next Step" button. Any ideas would be appreciated. Cheers.


you can create your tabe pages and remove all pages except first page by

Like

 tabControl1.TabPages.Remove(tabPage2);
.
.
.
 tabControl1.TabPages.Remove(tabPageN);

and after each click of next button add proper page (may be next page ) to tabecontrol

    tabControl1.TabPages.Add(tabPage2);

and

    tabControl1.TabPages.Add(tabPage3);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜