Getting the tab I am coming from

  • Thread starter Thread starter Ron L
  • Start date Start date
R

Ron L

Is there a way in the tab control's SelectedIndexChanged event to tell which
tab the user was on (rather than the one that has been selected to throw the
event)? I know that I can add code to the form to keep track of this, but I
would prefer to do it "automagically" if possible.

TIA
Ron L
 
Ron L said:
Is there a way in the tab control's SelectedIndexChanged event to tell
which tab the user was on (rather than the one that has been selected to
throw the event)? I know that I can add code to the form to keep track of
this, but I would prefer to do it "automagically" if possible.

AFAIK no, but it's easy to create a solution for the problem by storing a
reference to the selected page in a private variable, for example.
 
Claes
Thanks for the response. I have a list/detail page with the list on one
tab and the detail on the other. If the user has edited the details I want
to catch when the leave the tab to remind them to save. I was hoping to do
this directly from the tab control instead of adding local variables.

Ron L
 
Herfried
Thanks for the reply. I figured that this might be the answer, but
wanted to see if there was something I missed.

Ron L
 
Claes
Thanks for the link. That looks like what I was looking for, I will
take a look at it.

Ron L
 
Back
Top