Select another page on TabControl

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?VmFuZXNzYQ==?=

    Select another page on TabControl

    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.Sele ctedTab, but it didin't work.

    Thank you in advance,
    Vanessa
  • Ignacio Machin ( .NET/ C# MVP )

    #2
    Re: Select another page on TabControl

    On Apr 9, 1:11 pm, Vanessa <Vane...@discus sions.microsoft .comwrote:
    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.Sele ctedTab, but it didin't work.
    >
    Thank you in advance,
    Vanessa
    You can simply set the SelectedIndex to the next one.

    Comment

    Working...