grwallace
asked on
How do you get the PreviousTab in a tab control in vb.net
In VB6 we had
Private Sub SSTab1_Click(PreviousTab As Integer)
end sub
Can we get the previous tab in VB.Net, or is this something we have to set up manually?
Private Sub SSTab1_Click(PreviousTab As Integer)
end sub
Can we get the previous tab in VB.Net, or is this something we have to set up manually?
I think we have to do it manually! At least I do it and I don't know another way.
There are several events available on the Tab control, the most promising one is -
-------------------------- ---------- ---------- --
Public Event Selecting(ByVal sender As Object, ByVal e As System.Windows.Forms.TabCo ntrolCance lEventArgs )
Member of: System.Windows.Forms.TabCo ntrol
Summary:
Occurs before a tab is selected, enabling a handler to cancel the tab change.
-------------------------- ---------- ---------- --
If the TabControlCancelEventArgs, contains the tab / index which is going to be selected, then you can get the currently selected tab / index from the Tab control and the going-to-be-selected from the TabControlCancelEventArgs.
--------------------------
Public Event Selecting(ByVal sender As Object, ByVal e As System.Windows.Forms.TabCo
Member of: System.Windows.Forms.TabCo
Summary:
Occurs before a tab is selected, enabling a handler to cancel the tab change.
--------------------------
If the TabControlCancelEventArgs,
ASKER
I'm not sure how to extract the value from the TabControlEventsArg, but this looks like what I want
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.