How can I go to the last visited tab when the current tab is removed?
-
Hi, Can you please tell me how can I go to the last visited tab (not the first one, as the default tabControl behaver is) when the current tab is removed? Your help would be greatly appreciated.
hi, try saving the index of the last visited tabcontrol in a global variable. it is easy to do. Declare a global variable and use the tab index change event. and asign the past index to the variable when this index changes to another. hope it helps jamil abou khalil
-
hi, try saving the index of the last visited tabcontrol in a global variable. it is easy to do. Declare a global variable and use the tab index change event. and asign the past index to the variable when this index changes to another. hope it helps jamil abou khalil
to use a variable doesn't just solve the problem. for instance if you turn off 2 or more tabs consecutively it won't work. if you use a routine that allows to include and to remove several tabs then it should use a LIFO. when eliminating a tab it removes all the occurrences of this in the LIFO and go back to the last tab of the LIFO. :)