Select another page on TabControl

  • Thread starter Thread starter Vanessa
  • Start date Start date
V

Vanessa

Hi all!

I have 4 pages in a TabControl. Depending on a selection on the first page,
I enable the second page and disable the third one, and vice-versa.

What I want is that when the user try to select the disabled page I select
the following one. For example, if the second page is disabled, if he select
this one, I want to select the third page.

I tried to use Selecting event, using "e.Cancel==true" to the disabled page
and select appropriated page via TabControl.SelectedTab, but it didin't work.

Thank you in advance,
Vanessa
 
Hi all!

I have 4 pages in a TabControl. Depending on a selection on the first page,
I enable the second page and disable the third one, and vice-versa.

What I want is that when the user try to select the disabled page I select
the following one. For example, if the second page is disabled, if he select
this one, I want to select the third page.

I tried to use Selecting event, using "e.Cancel==true" to the disabledpage
and select appropriated page via TabControl.SelectedTab, but it didin't work.

Thank you in advance,
Vanessa

You can simply set the SelectedIndex to the next one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top