TabPage and VS.NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Maileen

    #1

    TabPage and VS.NET

    Hi,

    I have a TabControl which include 2 TabPages.

    When user click on some Treeview items, i want to show one of the TabPages (as i want).

    I tried show(), Select() or BringToFront() but nothing worked.

    Could you tell me what is the way to do this ?

    thanks a lot,
    Maileen
  • beaker

    #2
    Re: TabPage and VS.NET

    Maileen wrote:[color=blue]
    > Hi,
    >
    > I have a TabControl which include 2 TabPages.
    >
    > When user click on some Treeview items, i want to show one of the
    > TabPages (as i want).
    >
    > I tried show(), Select() or BringToFront() but nothing worked.
    >
    > Could you tell me what is the way to do this ?
    >
    > thanks a lot,
    > Maileen[/color]

    To bring page 'i' to the front of 'TabControl1', it would be

    TabControl1.Sel ectedIndex = i


    Gary

    Comment

    • Maileen

      #3
      Re: TabPage and VS.NET

      thanks a lot,
      it works great....

      Maileen.

      beaker wrote:[color=blue]
      > Maileen wrote:[color=green]
      >> Hi,
      >>
      >> I have a TabControl which include 2 TabPages.
      >>
      >> When user click on some Treeview items, i want to show one of the
      >> TabPages (as i want).
      >>
      >> I tried show(), Select() or BringToFront() but nothing worked.
      >>
      >> Could you tell me what is the way to do this ?
      >>
      >> thanks a lot,
      >> Maileen[/color]
      >
      > To bring page 'i' to the front of 'TabControl1', it would be
      >
      > TabControl1.Sel ectedIndex = i
      >
      >
      > Gary[/color]

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: TabPage and VS.NET

        "Maileen" <noemail@nospam .com> schrieb:[color=blue]
        > I have a TabControl which include 2 TabPages.
        >
        > When user click on some Treeview items, i want to show one of the TabPages
        > (as i want).[/color]

        Check out the tabcontrol's 'SelectedTab' and 'SelectedIndex' properties.

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://classicvb.org/petition/>

        Comment

        Working...