Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Container Tab Index

Hi

I have a container which contains two tab for two charts. I want to know which tab is the currently active tab like GetActiveTabe(). I dont wanna change anything in the container just want to get the index.

Since there is no trigger, is there a walk around?

Capture.PNG

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

AFAIK - only with a VBScript Macro like this:

Sub GetActiveTab
     Set ContainerObj = ActiveDocument.GetSheetObject("CT01")
     Set ContProp=ContainerObj.GetProperties
     ActiveObject=ContProp.SingleObjectActiveIndex
     MsgBox ActiveObject
End Sub

BTW: Macros are considered "evil" ...

View solution in original post

5 Replies
Gysbert_Wassenaar

The alternative is to use separate charts instead of a container and show/hide these charts as needed based one or more variables that are controlled by button clicks or a selection in a listbox. You can find an example here: Toggling multiple charts with variables and conditional show


talk is cheap, supply exceeds demand
petter
Partner - Champion III
Partner - Champion III

AFAIK - only with a VBScript Macro like this:

Sub GetActiveTab
     Set ContainerObj = ActiveDocument.GetSheetObject("CT01")
     Set ContProp=ContainerObj.GetProperties
     ActiveObject=ContProp.SingleObjectActiveIndex
     MsgBox ActiveObject
End Sub

BTW: Macros are considered "evil" ...

Not applicable
Author

Why MsgBox?  )
Thanks anyways

petter
Partner - Champion III
Partner - Champion III

It should have been removed of course (the MsgBox) ... only tor testing ...

StevenJDH
Employee
Employee

This was an issue that I brought up to R&D a while ago. Those who are using certain versions QlikView will notice that these properties no longer produce the desired result. The API for getting the active object and changing the active object programmatically can be found in this article with examples: https://support.qlik.com/articles/000070090