Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27374

VS 2010 Tab Control Event Handling

$
0
0
Hi,

I have a TabControl on my form and I'm trying to handle the "leave" event such that I can decide what to do based on which other tab page has been selected. As an example, suppose I have 3 tabs; A, B and C. If I have tab page B selected I would like to do something different depending on whether I then selected tab page A or C.

I'm trying to write something in the TabPage_Leave routine but I can't find a property / method that gives me what tab page I have selected (i.e. A or C). All that is returned when I use the "SelectedTab" or "SelectedIndex" is the equivalent of page B above.

Does anyone know how I can do this?

Thanks for any help.
N

Viewing all articles
Browse latest Browse all 27374