I implement a UI with six tabs. Following the existing help material on the Internet and this Forum, I use 6 buttons in a horizontal layout. Each button has a unique panel with UI tools. The active tab has a different colour from those that are not selected.
My question is: How can one efficiently implement the change from one tab to another? At the moment, each time a new tab is selected, the appropriate panel needs to be made visible and all other panels are made invisible. In addition, The colour of the new active tab is changed appropriately and the colour of all other tabs are changed to the inactive colour. This setup is highly inefficient since, upon selecting a new tab, the visibility of 6 panels needs to be set and the colours of six tabs need to be set.
I would like to create the equivalent of a pointer to the last tab that was selected. When a tab is selected, a pointer to it is set. When a different tab is selected, only the panel visibility and tab colour of the tab pointed to by the pointer need change since the setups for all other non-selected tabs have not changed. I have not come accross a way to create pointers in AI2. The declaration of variables using the blocks UI appears not to allow this. If I do set global variable "pointer1" to button1, AI2 accepts the assignment. But then I do not have access to a colour attribute of variable "pointer1".
I would really appreciate any comments.