Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
725
WinTab: initial tab activation
posted

Hello,

I have created a frame (frmRGC_Interface) with a pane which is the container for a user control. I have five different user controls, each of them with a UltraTab control "tabInterface" containing the same tabs.

The parent frame (frmRGC_Interface) which contains the pane is replacing the displayed user control within the pane, so I will dispose the last used user control before I display a new one. The idea is to keep the last activated (selected) tab.

I tried to do the following:

-- in the user control's dispose event, I set a friend shared variable "frmRGC_Interface.curTab" to the key of current active tab like:
frmRGC_Interface.curTab = tabInterface.ActiveTab.Key

-- in the new event of the user control, I set the tab like:  tabInterface.Tabs(frmRGC_Interface.curTab).Active = True

 Problem: each time the NEW event is processed, the system always reactivates the first tab of tabInterface.

How can I keep the activation of a tab (or transfer the actviation status between user controls) ?

Thanks
Stephan